Part Number Hot Search : 
LB119 F1070 5365F5 DTB123TS STG512 4S1063 4040D AD9280
Product Description
Full Text Search
 

To Download GMS30C7201 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  GMS30C7201 data sheet issued: december 1998 copyright advanced risc machines ltd (arm) 1998 copyright hyundai microelectronics co ltd 1999 all rights reserved
ii GMS30C7201 data sheet proprietary notice hme logo are trademarks of hyundai microelectronics ltd. neither the whole nor any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with the prior written permission of the copyright holder. the product described in this document is subject to continuous developments and improvements. all particulars of the product an d its use contained in this document are given by hme in good faith. however, all warranties implied or expressed, including but not limited to implied warranties or merchantability, or fitness for purpose, are excluded. this document is intended only to assist the reader in the use of the product. hme ltd shall not be liable for any loss or dama ge arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product. document status the document?s status is displayed in a banner at the bottom of each page. this describes the document?s confidentiality and it s information status. information status is one of: advance information on a potential product preliminary current information on a product under development final complete information on a developed product change log issue date by change a-01 august 1997 paw first draft a-02 december 1997 jm, pg second draft a january 1998 jm, pg first release b-01 december 1998 ps,kc add timing details c-01 june 1999 namil second release
preface-i GMS30C7201 data sheet z introduction ii preface
preface-ii GMS30C7201 data sheet introduction the GMS30C7201 is a highly-integrated microprocessor for personal digital assistants, and other applications described below. the device incorporates an arm720t cpu, piccolo dsp, and system interface logic to interface with various types of devices. GMS30C7201 is a highly-modular design based on the amba bus architecture between cpu and internal modules. the on-chip peripherals include keyboard controller, vga and lcd controller complete with dma support for external sdram memory. the GMS30C7201 also supports voice recording, sound playback and a touch panel interface. piccolo enables softmodems to be used, and an on chip codec interface enables a low-cost modem solution. the power management features result in very low power consumption. the GMS30C7201 provides an excellent solution for personal digital assistants(pdas) ,and data terminal running the microsoft windows ce operating system. other applications include smart phones, internet appliances, car navigation, particularly where windows ce support is required. features  32-bit arm7tdmi risc static cmos cpu core  8kbytes combined instruction/data cache  memory management unit for windowsce  piccolo dsp(supports softmodem)  512-byte instruction cache for piccolo dsp  supports little endian operating system  on-chip peripherals with individual power-down: - multi-channel dma -timer - interrupt controller - memory controller for rom, flash, sram, sdram - pcmcia ii and compact flash controller - power management unit - lcd controller for mono/color stn and tft lcd - vga controller with on-chip dacs (for direct drive of monitors) - real-time clock (32.768khz oscillator) - infrared communications (irda support for 4mbps and lower rates) - 2 uarts (16c550 compatible) - afe (analog front end or codec) interface - keyboard control interface -gpio - synchronous serial interface module for mmc card - usb (target) - adc and interface module (touch panel) - dac and interface module (sound output) -pll  jtag debug interface and boundary scan  0.35mm process  3.3v supply voltage
preface-iii GMS30C7201 data sheet  360-pin bga package  60mhz operation frequency  low power consumption GMS30C7201 system overview keyboard arm720t slow apb bridge asb 30mhz static memory i/f and pc-card x32 x16 sdram fast apb bridge pmu piccolo 32khz ( rtc) ( ice and boundary scan) tic rom sram flash pcmcia slot 1 pcmcia slot 2 / compact flash 7201 buffer dmac (peripherals) 48mhz (irda&usb) osc 3.68mhz 60mhz (cpu) pll pll /2 31.5-40mhz (video) pll osc 30mhz (bus) mir/fir lcd controller (incl dmac) vga cont. (+dmac) usb dacs sound dac rgb monitor speaker intc timer spi uart uart sir serial irda (115k2 - 4m) photodiode keybd controller codec i/f (for softmodem) gpio adc dma adrs data sdram controller rtc battery (2 lines) digitiser (touch panel) microphone codec daa multi-media card pc lcd - mono/colour (stn/tft) 3.6864mhz slow apb 30mhz fast apb jtag
preface-iv GMS30C7201 data sheet
contents-1 GMS30C7201 data sheet 1 introduction 1-1 1.1 introduction 1-2 2 signal description 2-1 2.1 signal description for GMS30C7201 2-2 2.2 package details 2-7 2.3 pin list 2-8 3 architecture overview 3-1 3.1 internal bus structure 3-2 3.2 sdram controller 3-4 3.3 peripheral dma 3-5 3.4 power management 3-7 3.5 performance 3-8 4 arm720t macrocell 4-1 4.1 arm720t macrocell 4-2 5 piccolo macrocell 5-1 5.1 piccolo macrocell 5-2 6memory map 6-1 6.1 introduction 6-2 6.2 peripheral register map summary 6-5 6.3 high-speed apb peripherals 6-7 7pmu & pll 7-1 7.1 overview 7-2 7.2 block diagram 7-3 contents
contents-2 GMS30C7201 data sheet 7.3 power management states 7-5 7.4 power management 7-6 7.5 pmu registers 7-8 8 sdram controller 8-1 8.1 sdram controller specification 8-2 8.2 features 8-3 8.3 supported memory devices 8-4 8.4 sdram control registers 8-5 8.5 power-up initialization of the sdrams 8-10 8.6 sdram memory map 8-11 8.7 amba accesses and arbitration 8-15 8.8 merging write buffer 8-17 9 static memory interface 9-1 9.1 overview 9-2 9.2 hardware interface and signal description 9-3 9.3 functional description 9-5 9.4 register description 9-7 10 pcmcia interface 10-1 10.1 overview 10-2 10.2 register description and map 10-10 10.3 functional description 10-23 11 lcd & vga controllers 11-1 11.1 overview 11-2 11.2 video operation 11-3 11.3 video control register 11-7 11.4 lcd timing 0 register 11-9 11.5 lcd timing 1 register 11-11 11.6 lcd timing 2 register 11-13 11.7 vga timing 2 register 11-16 11.8 vga timing 3 register 11-17 11.9 lcd dma base address register 11-18 11.10 lcd dma channel current address register 11-19 11.11 lcd controller status/mask and interrupt registers 11-20 11.12 lcd palette registers 11-22 11.13 vga test register 11-23 11.14 grayscaler test registers 11-24 11.15 video controller register locations 11-25 12 fast amba peripherals 12-1 12.1 introduction 12-2 12.2 peripheral dma controller 12-3 12.3 medium and fast infrared module 12-17 12.4 general configuration 12-26 12.5 transmitting data 12-27 12.6 receiving data 12-29 12.7 special conditions 12-31 12.8 medium speed infra-red port (mir) 12-32
contents-3 GMS30C7201 data sheet 12.9 fast infrared port (fir) 12-41 12.10 universal serial bus 12-53 12.11 sound interface 12-68 13 slow amba peripherals 13-1 13.1 introduction 13-2 13.2 uart 13-3 13.3 sir 13-22 13.4 keyboard interface 13-23 13.5 gpio 13-31 13.6 interrupt controller 13-38 13.7 timers 13-42 13.8 synchronous serial interface 13-46 13.9 analog front end, afe (codec interface) 13-56 13.10 real time clock 13-64 13.11 analog ? digital converter interface controller (aic) 13-68 14 debug and test interface 14-1 14.1 overview 14-2 14.2 software development debug and test interface 14-3 14.3 test access port and boundary-scan 14-4 14.4 production test features 14-26 15 electrical characteristics 15-1 15.1 absolute maximum ratings 15-2 15.2 dc characteristics 15-3 15.3 a/d converter electrical characteristics 15-5 15.4 d/a converter characteristics 15-6 15.5 ac characteristics 15-7 15.6 recommended soldering conditions 15-13
contents-4 GMS30C7201 data sheet
1-1 GMS30C7201 data sheet 1.1 introduction 1-2 introduction 1
introduction 1-2 GMS30C7201 data sheet 1.1 introduction the GMS30C7201 is a high-performance, low-power, single-chip computer optimized for wince applications. it incorporates the arm720t wince-enabled core, which also incorporates arm ? s novel thumb code compression mechanism. the GMS30C7201 also incorporates arm ? s unique piccolo dsp coprocessor, which gives the GMS30C7201 enough dsp horse-power to perform software modem functions simultaneously with wince operation. 1.1.1 processor the arm720t core incorporates an 8k unified write-through cache, and an 8 data entry, 4 address entry write buffer. it also incorporates an mmu with a 64 entry tlb, and wince enhancements. the piccolo sp7 core incorporates a 512-byte, instruction- only cache. piccolo data is supplied by the arm720t core, via the coprocessor interface, and hence may be cached in the arm720t ? s 8k unified cache. 1.1.2 piccolo piccolo is an arm coprocessor that boosts the performance of the standard arm720t cpu to state-of-the-art dsp levels. it integrates:  dsp-oriented datapath  associated dsp instruction set in addition to the standard arm 32-bit risc/16-bit thumb system. the design/implementation of the piccolo coprocessor allows data re-use - both the arm720t and the coprocessor share the same single system bus. the implementation is therefore cost-effective and power-efficient. other advantages of this approach include integrated hardware and software development. the arm software development toolkit and emulator support both the cpu and the coprocessor. the GMS30C7201 will run a v34bis (33k6bps) softmodem. 1.1.3 video the GMS30C7201 has direct support for mono and color passive lcd displays, as well as color tft lcd displays, with resolution programmable up to 640x480 vga resolution. in addition, a separate independent vga port allows simultaneous display on a vga resolution monitor, of either the same image as the lcd, or alternatively an entirely different image. the GMS30C7201 has on-chip video dacs, allowing the chip to drive a monitor with the minimum of external circuitry. 1.1.4 memory and pc-cards GMS30C7201 incorporates two separate memory interfaces. a high speed 16-bit wide interface connects directly to one to four 16, 64 or 128mbit sdram devices, supporting dram memory sizes in the range 2 to 64mb. in addition, a separate lower speed 32- bit data path interfaces to rom or flash devices. burst mode roms are supported, for increased performance, allowing operating system code to be executed directly from rom. since the rom and sdram interfaces are separate, the arm processor core can access o/s code in rom simultaneously with video dma access to the sdram, thus increasing total effective memory bandwidth, and hence overall performance. in addition, running code directly from rom reduces total system cost, since rom is significantly cheaper on a $/bit basis than dram. the rom/flash interface also allows control of one or two pc-card interfaces, although in this case, external buffers and level translators are needed to interface to the card. the GMS30C7201 generates all signals to control these buffers directly. since compactflash is a subset of the pc-card standard, one of the pc-card slots
introduction 1-3 GMS30C7201 data sheet may be used as a compactflash interface. the pc-card interface supports the 16-bit slave-only interface, with no dma support. it does not support the cardbus 32-bit bus master option in the standard. 1.1.5 peripherals and communications communications are well-catered for, by two uarts, an irda interface (supporting slow, medium and fast protocols), a serial interface to a modem codec chip, for use by the soft-modem, and an on-chip keyboard controller, which directly scans the key matrix. one of the two uarts is used to implement the irda protocol. if irda is not being used, then this uart is available for general use. a synchronous serial interface allows connection to a variety of devices, such as an rf modem or a multimedia card. a slave usb port supports connection of an GMS30C7201-based pda as a peripheral to a pc or other usb host controller. a group of general purpose i/o pins can be utilized as required in a pda design. an on-chip dac supports audio output, and an on-chip adc supports microphone input, the digitizer tablet and battery status monitoring functions. internally, three general-purpose timers and a real-time clock provide timer functionality to be used as required by the o/s, and a two-channel general purpose dma controller can be allocated to the communications peripherals, as required. 1.1.6 power management the GMS30C7201 incorporates advanced power management functions, allowing the whole device to be put into a standby mode, when only the real time clock runs. the sdram is put into low-power self refresh mode to preserve it ? s contents. the GMS30C7201 may be forced out of this state by either a real-time clock wake-up interrupt, a user wake-up event (which would generally be a user pressing the ? on ? key) or by the uart ring-indicate input. the power management unit (pmu) controls the safe exit from standby mode to operational mode, ensuring that sdram contents are preserved. in addition, halt and slow modes allow the processor to be halted, or run more slowly than usual, to reduce power consumption. the processor can be quickly brought out of the halted state by a peripheral interrupt. the advanced power management unit controls all this functionality. in addition, individual devices and peripherals may be powered down when they are not in use. for example, the vga controller can be disabled when an external monitor is not in use (which saves not only the power of the digital controller, but also of the analog dacs), or the piccolo dsp coprocessor can be powered-down when dsp support (in soft-modem code, for example) is not required. 1.1.7 test and debug the GMS30C7201 incorporates the arm standard test interface controller (tic) allowing 32-bit parallel test vectors to be passed onto the internal bus. this allows access to the arm720t macro-cell core, and also to memory mapped devices and peripherals within the GMS30C7201. in addition, the arm720t and piccolo include support for the arm debug architecture (embedded ice), which makes use of a jtag boundary scan port to support debug of code on the embedded processor and dsp cores. the same boundary scan port is also used to support a normal pad-ring boundary scan for board level test applications.
introduction 1-4 GMS30C7201 data sheet
2-1 GMS30C7201 data sheet 2.1 signal description for GMS30C7201 2-2 2.2 package details 2-7 2.3 pin list 2-8 signal description 2
signal description 2-2 GMS30C7201 data sheet 2.1 signal description for GMS30C7201 key to signal types: o output i input oa analog output ia analog input io input/output ioa analog input/output is input with schmitt level input threshold p power input u suffix to indicate integral pullup d suffix to indicate integral pulldown signal name type description ld[11:0] o lcd data bus. allow 4:4:4 tft, color (using [7:0]) or mono, using [3:0] or [7:0] lcp olcd clock pulse llp o ldc line pulse (hsync for tft) lfp o lcd frame pulse (vsync for tft) lac o lcd ac bias (clock enable for tft) lcden o display enable signal for lcd. enables high voltage to lcd lblen o lcd backlight enable vgaroutp oa vga red output. drives 75 ohm terminated load directly vgaroutm oa vga red output. drives 75 ohm terminated load directly vgagoutp oa vga green output. drives 75 ohm terminated load directly vgagoutm oa vga green output. drives 75 ohm terminated load directly vgaboutp oa vga blue output. drives 75 ohm terminated load directly vgaboutm oa vga blue output. drives 75 ohm terminated load directly vgahs o vga hsync output vgavs o vga vsync output vgaref ia vga dac reference current input vgaavdd[1:0] p vga dac analog vdd supply vbias oa vga dac analog bias vt[1:0] oa vga voltage reference for comparator vgaavss p vga dac analog vss supply table 2-1: signal description table
signal description 2-3 GMS30C7201 data sheet ra[25:0] o rom and pc-card address bus rd[31:0] io rom and pc-card data bus, plus test bus nrcs[2:0] o rom chip select outputs. nrcs[5:3] , or portd[3:1] io rom chip select outputs, or general io pins controlled by the pmps register in gpio subsystem. nroe o rom and pc-card output enable signal nrwe[3:0] o rom and pc-card write enable signals. one per byte. exprdy i wait from external i/o exbclk , or portd[0] io bus clock output, or general io pin controlled by the pmps register in gpio subsystem. bootbit[1:0] i 16/32 bit rom selection npcbce[1:0] o pc-card card enable signals npcace[1:0] o pc-card card enable signals npcbiord o pc-card i/o read enable npcaiord o pc-card i/o read enable npcbiowr o pc-card i/o write enable npcaiowr o pc-card i/o write enable pcareset o pc-card a reset signal pcbreset o pc-card b reset signal npcawait i pc-card a wait signal npcbwait i pc-card b wait signal npcreg o pc-card attribute memory select pcaready i pc-card a ready input, or interrupt request in i/o mode pcbready i pc-card b ready input, or interrupt request in i/o mode pcabvd[1:0] i pc-card a battery status, or nspkr/nstschg in i/o mode pcbbvd[1:0] i pc-card b battery status, or nspkr/nstschg in i/o mode npcacd[1:0] iu pc-card a card detect signals npcbcd[1:0] iu pc-card b card detect signals pccadrv o pc-card a is selected pccbdrv o pc-card b is selected pcbiporte o pc-card data buffer external bidirectional buffer control pcawp i pc-card a write protect/iois16 signal name type description table 2-1: signal description table (continued)
signal description 2-4 GMS30C7201 data sheet pcbwp i pc-card b write protect/iois16 pcavs[1:0] iu pc-card a voltage sense signals pcbvs[1:0] iu pc-card b voltage sense signals pcavppen[1:0] o pc-card a vpp control signals pcbvppen[1:0] o pc-card b vpp control signals npcboe o pc-card output enable detect signals npcaoe o pc-card output enable detect signals npcbwe o pc-card write enable for memory card npcawe o pc-card write enable for memory card pcavccen[1:0] o pc-card a vcc control signals pcbvccen[1:0] o pc-card b vcc control signals sclk o sdram clock output scke[3:0] o sdram clock enable output nsras o sdram ras output nscas o sdram cas output nswe o sdram write enable output nscs[3:0] o sdram chip select outputs sdqml o sdram lower data byte enable sdqmu o sdram upper data byte enable sd[15:0] io sdram data bus sa[13:0] o sdram address bus nudcd[1:0] iu uart data carrier detect inputs nudsr[1:0] iu uart data set ready inputs nucts[1:0] iu uart clear to send inputs usin[1:0] iu uart serial data inputs usout[1:0] o uart serial data outputs nudtr[1:0] o uart data terminal ready nurts[1:0] o uart request to send ssdin i synchronous serial data input ssout o synchronous serial data output ssclk o synchronous serial clock output signal name type description table 2-1: signal description table (continued)
signal description 2-5 GMS30C7201 data sheet nsscs o synchronous serial chip select irdin i irda infra-red data input irdout o irda infra-red data output gpio: porta[7:0] portb[7:6] portc[7:0] portd[7:4] io io io io gpio interface. 8 general-purpose i/o lines. gpio interface. 2 general-purpose i/o lines. gpio interface. 8 general-purpose i/o lines. gpio interface. 4 general-purpose i/o lines. mring i ring indicator (wake-up signal to pmu) mrly o modem relay control mclk i modem clock input mdfr i modem data frame input mdin i modem data input mdout o modem data output nmcon o modem control data select (high for data, low for control) uvpo , or portb[0] io usb output differential drive (+), or general io pin controlled by the pmps register in gpio subsystem. uvmo , or portb[1] io usb output differential drive (-), or general io pin controlled by the pmps register in gpio subsystem. nusboe , or portb[2] io usb output enable, or general io pin controlled by the pmps register in gpio subsystem. urcvin , or portb[3] io usb receive data, or general io pin controlled by the pmps register in gpio subsystem. uvp , or portb[4] io usb gated input differential drive (+), or general io pin controlled by the pmps register in gpio subsystem. uvm , or portb[5] io usb gated input differential drive (-), or general io pin controlled by the pmps register in gpio subsystem. ususpend o usb low power state atsxp o touch screen switch x output atsxm o touch screen switch x output atsyp o touch screen switch y output atsym o touch screen switch y output adin[4:0] ia adc inputs for mic and battery avdddac p dac analog vdd and reference avssdac p dac analog vss signal name type description table 2-1: signal description table (continued)
signal description 2-6 GMS30C7201 data sheet avrefadc ia adc reference voltage avddadc p adc analog vdd avssadc p adc analog vss adac[1:0] oa sound dac outputs kscano[10:0] o keyboard scan outputs kscani[7:0] iu keyboard scan inputs npor isu power on reset input. schmitt level input, with pullup. npmwakeup isu wake-up ? on-key ? input. low causes pmu to exit standby state. nreset iou reset input (also driven out in por, until the pll is locked) pmadapok i adapter power ok. pmbatok i main battery ok. rtcoscin ia rtc oscillator input rtcoscout oa rtc oscillator output oscin ia main oscillator input oscout oa main oscillator output npllenable id low to enable pll. high to bypass pll with clock from oscin. pllvdd[1:0] p pll analog power supply pllvss[1:0] p pll analog ground input pllfilt[2:0] ioa external pll loop filter input/output pins (1 per pll) tck iu jtag boundary scan and debug test clock ntrst id jtag boundary scan and debug test reset tms iu jtag boundary scan and debug test mode select tdi iu jtag boundary scan and debug test data input tdo o jtag boundary scan and debug test data output ntest iu test mode select vddcore[3:0] p core vdd supply vsscore[3:0] p core vss supply vdd[25:0] p pad vdd supply vss[25:0] p pad vss supply signal name type description table 2-1: signal description table (continued)
signal description 2-7 GMS30C7201 data sheet 2.2 package details this diagram, figure 2-1: side view of the pbga package , gives a side view of the pbga package. figure 2-1: side view of the pbga package this diagram, figure 2-2: dimensions of the pbga package , gives the dimensions of the package in millimeters. figure 2-2: dimensions of the pbga package
signal description 2-8 GMS30C7201 data sheet 2.3 pin list use figure 2-3: pin location and signal cross-references (bottom view) and table 2-2: pin reference numbers and signal names on page 2-8 to match pins and signals. pin a1 (gnd) is in the top right-hand corner of the diagram marked ? pin 1 corner ? . this is a bottom view of the package. figure 2-3: pin location and signal cross-references (bottom view) pin signal pin signal a1 gnd a8 nscs[3] a2 ntest a9 scke[3] a3 sa[3] a10 sdqml a4 sa[4] a11 sd[8] a5 sa[5] a12 sd[9] a6 sa[0] a13 sd[10] a7 sa[12] a14 sd[12] table 2-2: pin reference numbers and signal names
signal description 2-9 GMS30C7201 data sheet a15 sd[14] b23 ususpend a16 porta[0] c1 tdi a17 porta[1] c2 oscin a18 porta[2] c3 gnd a19 porta[3] c4 npllenable a20 uvpo c5 sa[6] a21 uvmo c6 sa[10] a22 nusboe c7 sa[13] a23 gnd c8 nscs[1] b1 oscout c9 scke[1] b2 gnd c10 sdqmu b3 npor c11 pmadapok b4 sa[2] c12 pmbatok b5 sa[1] c13 sd[11] b6 sa[7] c14 sd[13] b7 sa[9] c15 sd[15] b8 nscs[2] c16 portc[0] b9 scke[2] c17 portc[1] b10 nswe c18 portc[2] b11 sd[7] c19 portc[3] b12 sd[6] c20 uvm b13 sd[5] c21 gnd b14 sd[3] c22 npcace[0] b15 sd[1] c23 npcace[1] b16 porta[4] d1 tms b17 porta[5] d2 tck b18 porta[6] d3 tdo b19 porta[7] d4 gnd b20 urcvin d5 nreset b21 uvp d6 sa[8] b22 gnd d7 sa[11] pin signal pin signal table 2-2: pin reference numbers and signal names (continued)
signal description 2-10 GMS30C7201 data sheet d8 nscs[0] e16 portb[7] d9 scke[0] e17 vdd d10 nscas e18 portb[6] d11 vddcore e19 gnd d12 vsscore e20 npcaiord d13 sd[4] e21 npcaiowr d14 sd[2] e22 pcareset d15 sd[0] e23 npcawait d16 portc[4] f1 lfp d17 portc[5] f2 lac d18 portc[6] f3 lcp d19 portc[7] f4 ld[11] d20 gnd f5 irdin d21 npcreg f19 pcbiporte d22 npcbce[0] f20 npcbiord d23 npcbce[1] f21 npcbiowr e1 llp f22 pcbreset e2 ntrst f23 npcbwait e3 lcden g1 ld[10] e4 lblen g2 ld[9] e5 gnd g3 ld[8] e6 irdout g4 ld[7] e7 vdd g5 vdd e8 nsras g19 vdd e9 vdd g20 pcabvd[0] e10 sclk g21 pcabvd[1] e11 npmwakeup g22 pccadrv e12 gnd g23 pcaready e13 vdd h1 ld[6] e14 portd[6] h2 ld[5] e15 vdd h3 ld[4] pin signal pin signal table 2-2: pin reference numbers and signal names (continued)
signal description 2-11 GMS30C7201 data sheet h4 ld[3] l5 vdd h5 ld[2] l19 portd[7] h19 npcawe l20 vddcore h20 pcbbvd[0] l21 pcavppen[0] h21 pcbbvd[1] l22 pcavs[0] h22 pccbdrv l23 pcavs[1] h23 pcbready m1 vt[1] j1 ld[1] m2 vgaref j2 ld[0] m3 vt[0] j3 vgaavdd[0] m4 vsscore j4 vgahs m5 gnd j5 vdd m19 gnd j19 vdd m20 vsscore j20 npcaoe m21 pcavppen[1] j21 pcawp m22 pcbvs[0] j22 npcacd[0] m23 pcbvs[1] j23 npcacd[1] n1 avdddac k1 vgaroutp n2 vbias k2 vgaroutm n3 adac[0] (r) k3 vgagoutm n4 vddcore k4 vgavs n5 pllvss[0] k5 vgaavss n19 vdd k19 npcbwe n20 pcbvppen[0] k20 npcboe n21 pcbvppen[1] k21 pcbwp n22 pcavccen[0] k22 npcbcd[0] n23 pcavccen[1] k23 npcbcd[1] p1 pllvdd[0] l1 vgaboutm p2 adac[1] (l) l2 vgaboutp p3 pllfilt[0] l3 vgaavdd[1] p4 avssdac l4 vgagoutp p5 avddadc pin signal pin signal table 2-2: pin reference numbers and signal names (continued)
signal description 2-12 GMS30C7201 data sheet p19 rd[23] u20 rd[13] p20 rd[27] u21 rd[17] p21 rd[30] u22 rd[20] p22 pcbvccen[0] u23 rd[24] p23 pcbvccen[1] v1 nsscs r1 pllfilt[2] v2 ssdin r2 pllfilt[1] v3 atsym r3 adin[0] v4 ssclk r4 pllvdd[1] v5 mclk r5 vdd v19 rd[5] r19 vdd v20 rd[9] r20 rd[22] v21 rd[12] r21 rd[26] v22 rd[16] r22 rd[29] v23 rd[19] r23 rd[31] w1 atsxp t1 adin[1] w2 atsyp t2 pllvss[1] w3 atsxm t3 adin[4] w4 mdout t4 adin[2] w5 gnd t5 portd[5] w6 nurts[1] t19 rd[14] w7 vdd t20 rd[18] w8 kscano[6] t21 rd[21] w9 vdd t22 rd[25] w10 kscani[5] t23 rd[28] w11 vdd u1 avrefadc w12 gnd u2 adin[3] w13 portd[4] u3 ssout w14 ra[13] u4 avssadc w15 vdd u5 vdd w16 ra[4] u19 vdd w17 vdd pin signal pin signal table 2-2: pin reference numbers and signal names (continued)
signal description 2-13 GMS30C7201 data sheet w18 nrwe[3] aa3 gnd w19 gnd aa4 usin[1] w20 rd[4] aa5 nudcd[1] w21 rd[8] aa6 nudsr[1] w22 rd[11] aa7 kscano[9] w23 rd[15] aa8 kscano[4] y1 mdfr aa9 kscano[0] y2 mrly aa10 kscani[3] y3 mdin aa11 nrcs[5] y4 gnd aa12 exbclk y5 nudtr[1] aa13 ra[23] y6 usout[1] aa14 ra[20] y7 kscano[10] aa15 ra[16] y8 kscano[5] aa16 ra[11] y9 kscano[1] aa17 ra[7] y10 kscani[4] aa18 ra[2] y11 kscani[0] aa19 nrcs[2] y12 vsscore aa20 nrwe[1] y13 vddcore aa21 gnd y14 ra[17] aa22 rd[2] y15 ra[12] aa23 rd[6] y16 ra[8] ab1 rtcoscin y17 ra[3] ab2 gnd y18 nroe ab3 nmcon y19 nrwe[2] ab4 nucts[1] y20 gnd ab5 nurts[0] y21 rd[3] ab6 nudtr[0] y22 rd[7] ab7 kscano[8] y23 rd[10] ab8 kscano[3] aa1 rtcoscout ab9 kscani[7] aa2 mring ab10 kscani[2] pin signal pin signal table 2-2: pin reference numbers and signal names (continued)
signal description 2-14 GMS30C7201 data sheet ab11 nrcs[4] ac19 ra[5] ab12 exprdy ac20 ra[0] ab13 ra[25] ac21 nrcs[0] ab14 ra[22] ac22 rd[0] ab15 ra[19] ac23 gnd ab16 ra[15] ab17 ra[10] ab18 ra[6] ab19 ra[1] ab20 nrcs[1] ab21 nrwe[0] ab22 gnd ab23 rd[1] ac1 gnd ac2 usout[0] ac3 usin[0] ac4 nucts[0] ac5 nudsr[0] ac6 nudcd[0] ac7 kscano[7] ac8 kscano[2] ac9 kscani[6] ac10 kscani[1] ac11 nrcs[3] ac12 bootbit[0] ac13 bootbit[1] ac14 ra[24] ac15 ra[21] ac16 ra[18] ac17 ra[14] ac18 ra[9] pin signal pin signal table 2-2: pin reference numbers and signal names (continued)
3-1 GMS30C7201 data sheet 3.1 internal bus structure 3-2 3.2 sdram controller 3-4 3.3 peripheral dma 3-5 3.4 power management 3-7 3.5 performance 3-8 architecture overview 3
architecture overview 3-2 GMS30C7201 data sheet 3.1 internal bus structure figure 3-1: GMS30C7201 shows a block diagram of GMS30C7201. GMS30C7201 consists of the arm720t processor core, a piccolo sp7 dsp coprocessor and a set of peripherals. figure 3-1: GMS30C7201 3.1.1 GMS30C7201 bus structure the GMS30C7201 internal bus organization is based upon the amba standard, but with some minor modifications to the peripheral buses (the apbs). there are three main buses in the GMS30C7201: 1 the main system bus (the asb) to which the cpu and memory controllers are connected 2 the fast apb to which high-bandwidth peripherals are connected 3 the slow apb (to which timers, the uart and other low-bandwidth peripherals are connected) there is also a separate video dma bus. arm720t slow apb bridge asb 30mhz static memory i/f and pc-card fast apb bridge pmu piccolo 32khz ( rtc) tic dmac (peripherals) 48mhz (irda&usb) osc 3.68mhz 60mhz (cpu) pll pll /2 31.5-40mhz (video) pll osc 30mhz (bus) mir/fir lcd controller (incl dmac) vga cont. (+dmac) usb dacs sound dac intc timer spi uart uart sir keybd controller codec i/f (for softmodem) gpio adc dma adrs data sdram controller rtc 3.6864mhz slow apb 30mhz fast apb jtag
architecture overview 3-3 GMS30C7201 data sheet 3.1.2 asb the asb is designed to allow the arm to have continuous access to both the rom/ pcmcia interface and the sdram. the sdram controller straddles both the asb and the video dma bus so the lcd and vga can access the sdram controller simultaneously with activity on the asb. this means that the arm or piccolo can read code from rom, or access a peripheral, without being interrupted by video dma. the GMS30C7201 uses a modified arbiter to control mastership on the main asb bus. the arbiter only arbitrates on quad-word boundaries, or when the bus is idle. this is to get the best performance with the arm720t, which uses a quad-word cache line, and also to get the best performance from the sdram, which uses a burst size of eight halfwords per access. by arbitrating only when the bus is idle or on quad-word boundaries (a[3:2] = 11), it ensures that cache line fills are not broken up, hence sdram bursts are not broken up. video asb arbitration is controlled by the sdram controller. this is explained in 3.2.2 arbitration on page 3-4. 3.1.3 video bus the video bus hosts the lcd controller and the vga controller dma. the video bus consists of separate address inputs, a request / acknowledge to / from the sdram controller, for each of the lcd and vga blocks, and a shared data bus. the lcd and vga registers are programmed from the fast apb. the sdram controller arbitrates between asb, vga and lcd access requests. video always has higher priority than asb access requests. the split asb/video bus architecture of the sdram controller allows slow device accesses ? such as access to a pc-card that asserts a wait signal for several microseconds ? without blocking video dma. 3.1.4 apbs there are two apb buses. these are the fast and slow apb buses. the fast apb bus operates at the speed of the asb (30 mhz), and hosts the fast and medium speed infra-red interface, the usb interface, the sound output interface, and the lcd and vga registers. these are the high performance peripherals, which are generally dma targets. the slow apb peripherals generally operate at the uart crystal clock frequency of 3.6864mhz, though register access via the apb is at asb speed. the slow apb peripherals do not support dma transfers. this arrangement of operating most of the peripherals from a slower clock, and reducing the load on the faster bus, results in significantly reduced power consumption. both apb buses connect to the main asb bus via specially modified bridges.the slow apb bridge takes care of all re- synchronization, handing over data and control signals between the asb and uart clock domains in a safe and reliable manner. the fast apb bridge is modified from the normal amba bridge, to allow dma access to fast apb peripherals. additional signals from the dma controller to the apb bridge request, select and acknowledge dma transfers to and from dma-aware peripherals.
architecture overview 3-4 GMS30C7201 data sheet 3.2 sdram controller 3.2.1 overview the sdram controller is a key part of the GMS30C7201 architecture. the sdram controller has two data ports ? one for video dma and one for the main asb ? and interfaces to a single 16-bit wide sdram. one to four 16, 64 or 128mbit x16-bit devices are supported, giving a memory size ranging from 2 to 64mbytes. 3.2.2 arbitration the main asb and video dma buses are independent, and operate concurrently. the sdram controller contains the arbitration logic, for selecting between the two buses, and between the lcd and vga on the video bus. the video bus is always higher priority than the main bus. the sdram controller uses a modified round-robin arbitration between the lcd and the vga, but allows the highest priority device on the video bus to be programmed as either the lcd or the vga. the video interface consists of separate address and request inputs to the sdram controller, and shared data but individual acknowledge outputs to the vga and the lcd. the video access burst size is fixed to 16 words. the address is non-incrementing for words within a burst (as the sdram controller only makes use of the first address for each burst request). the arbitration scheme is modified round-robin. when the bus is idle, prioritization is fixed, with whichever lcd or vga is programmed as highest priority getting data next, if they request data at the same time. when the bus is busy, the prioritization becomes round-robin, so if the higher priority device wants two bursts one immediately after the other, but the other device also requested a burst at the same time as the higher priority device, (or after, but before the first burst to the other device completed), then the lower priority device would get the second burst, and the higher priority device the third burst. in use, the highest bandwidth video device (vga or lcd) should be programmed as highest priority in the sdram controller. if both devices are equal priority, and use the same bandwidth, an arbitrary decision can be made. if only one video device is being used (for example, only lcd is being used, as will most often be the case), then that device should have the highest priority.
architecture overview 3-5 GMS30C7201 data sheet 3.3 peripheral dma 3.3.1 overview GMS30C7201 incorporates a three-channel, general-purpose dma controller which operates on the asb. the dma controller is an amba compliant asb bus master with a higher arbitration priority than either the arm or piccolo dsp coprocessor, to ensure low dma latency. since, however, the main asb bus always has lower priority access to the sdram controller than the video bus, it will always get lower priority access to sdram than the lcd and vga. 3.3.2 transfer sizes the devices that make use of the peripheral dma are: 1usb 2 fast/medium ir 3 sound output the usb and fir are bidirectional but half-duplex, so only one dma channel is required at a time. the data rate for the usb is 12mbit/sec, which translates to 1.5mbyte/sec. the data rate for the fir is a maximum of 4mbit/sec, which translates to 0.5mbyte/sec. the sound output data rate is 88.2kb/sec. to ensure reasonable usage of sdram, apb and asb bandwidth, the transfer sizes to these device are: usb quad-word fir word sound word the sdram controller will do a complete quad-word access for every sdram access. with the transfer sizes above, the approximate sdram bandwidth taken by the devices is: usb 3% fir 4% sound 0.75% the maximum total of sdram bandwidth taken by all three devices running concurrently is 7.75%. dma accesses to fir and sound blocks are fully amba compliant, meaning that a word transfer takes a minimum of two bus cycles to complete. the apb protocol however, for usb dma accesses, has been slightly modified to allow burst accesses. 3.3.3 fly-by the dma controller is tightly coupled to the fast apb bridge. in order for the dma controller to start a transfer, it must first receive a dma data request from one of the peripherals; it will then request mastership of the asb. once granted, the dma controller will retain mastership of the asb until the requested dma transaction is completed, which ensures correct data in the dma peripherals (that is data in the dma peripherals cannot be modified by the arm processor while a dma transfer is in progress). the dma transfer request is monitored by the fast apb bridge, who will perform the correspondent apb transfer by inverting the read/write line with respect to the asb, to generate a pwrite signal on the apb. the dma transfer is acknowledged on the apb by asserting a pseldma signal for the given peripheral. the data is timed by pstb as on a normal apb transfer. the apb address pa is not used for dma transfers.
architecture overview 3-6 GMS30C7201 data sheet the apb bridge receives two signals from the dma controller called chan[1:0] , which tells it which dma channel (peripheral) the dma access is for. all other information comes from monitoring the asb bus signals. for example, the direction of transfer comes from bwrite (the sense is inverted to get the apb signal), and when the sdram transfer completes, comes from the bridge monitoring the bwait asb signal. 3.3.4 timing this is detailed in chapter 12, fast amba peripherals . 3.3.5 slow apb peripherals since the dma controller is not coupled with the slow apb bridge, it is not possible to use dma with devices on the slow apb bus. however, since devices on the slow apb bus are inherently low performance, this is not a serious restriction. devices on the slow apb bus must use the arm acting under interrupt control to simulate dma. the highest data rate peripheral on the slow apb bus is the modem codec interface, at a maximum of 48kb/sec. the arm fiq is used to transfer data to the codec. 3.3.6 sound output in the GMS30C7201, the sound peripheral is located on the fast apb bus, and is supported by the dma controller. (note that this is compatible with some operating systems, which require dma-support sound hardware.)
architecture overview 3-7 GMS30C7201 data sheet 3.4 power management the GMS30C7201 is designed for battery-powered portable applications and incorporates innovative design features in the bus structure and the pmu to reduce power consumption. the slow apb bus allows peripherals to be clocked slowly hence reducing power consumption. the use of three buses reduces the number of nodes that are toggled during a data access, thereby further reducing power consumption. in addition, clocks to peripherals which are not active can also be gated. 3.4.1 clock gating the high performance peripherals, such as the sdram controller and the lcd controller, run most of the time at high frequencies and careful design, including the use of clock gating, has minimized their power consumption. the vga controller can be powered down completely when not in use (that is, when not connected to an external monitor). 3.4.2 pmu the power management unit (pmu) is used to control the overall state the system is in. the system can be in one of five states: run the system is running normally. all clocks are running (except where gated locally), and the sdram controller is performing normal refresh. slow the system operates normally, except the arm is placed into fast bus mode, and hence is clocked at half its normal rate. idle in this mode, the pmu becomes the bus master until there is an interrupt for the cpu, or the peripheral dma controller requests mastership of the bus. sleep the sdram is placed into self-refresh mode, and internal clocks are gated off. this mode can only be entered from idle mode (that is, the pmu must be asb master before this mode can be entered). the pmu must get bus mastership to ensure that the system is stopped in a safe state and not, for example, half-way through an sdram write. usually this state is only to be entered briefly, on the way to entering deep sleep mode. deep sleep in deep sleep mode, the 3.6864mhz oscillator and the plls are disabled. this is the lowest power state available. only the 32khz oscillator runs. the real time clock and wakeup sections of the pmu are operated from this clock. everything else is powered down, and sdram is in self-refresh mode. this is the normal system ? off ? mode. sleep and deep sleep modes are exited either by a user wake-up event (generally pressing the ? on ? key), an rtc wake-up alarm, a device reset request, or by a modem ring indicate event. these interrupt sources go directly to the pmu. in addition, the modem ring indicate signal also goes to the normal interrupt controller to signal an interrupt if there is a ring indicate event in a non-sleep mode.
architecture overview 3-8 GMS30C7201 data sheet 3.5 performance arm720t operation the actual performance of the device will be highly application specific as well as dependent on the speed of memory attached and the rate at which data is being transferred to the dma peripherals, in particular the lcd and vga. if a particular application or part of application is executing entirely from within the 720t cache then the memory speed and peripheral dma bandwidth may not have any affect at all. however most applications will require access to either the static memory interface or the sdram interface for its data structures and for instructions whenever there are cache misses. the cache miss rate will have a large impact on the achievable performance, however it is impossible to predict this for any general application. it is possible though to give some indication of the potential performance of the device when operating out of cache. run mode operation (cache on and operating at 60mhz, asb clock at 30mhz): approximately 75k dhrystones/s (~42.6 dmips) slow mode operation (cache on and operating at the asb clock frequency of 30mhz): approximately 44k dhrystones/s (~25 dmips) * both sets of figures assume two wait state memory external memory is available and no peripheral dma is active. sp7 (piccolo) operation once again it is not possible to generalize about the performance achievable on arm720t when the sp7 co-processor (piccolo) is being used, it will depend entirely on the frequency with which the arm720t must transfer data to or from the sp7 co- processor which in turn is entirely application dependent. the performance of the arm7tdsp processing element is best illustrated by its performance for particular applications - it not possible to specify its performance in generalized mips terms. softmodem performance the following performance benchmarks have two columns. the first indicates the peak processor requirement when averaged over two frames (triple frame buffering is used to ensure no processor time overflow occurs). the peak occurs during the modem startup (training) sequence. the average value represents the softmodem requirement once the startup sequence has finished. all figures represent a system with data held in sdram, code held in 2 wait state burst rom, and 620x240 monochrome 4bpp lcd being displayed. the table below assumes the cpu clock is running at 60mhz and the memory clock at 30mhz. modem standard peak/mhz average/mhz v34bis with v42bis 54 42 v32bis 29 21 v17fax 14 14 table 3-1: cpu clock cycles used for softmodem
architecture overview 3-9 GMS30C7201 data sheet fft performance the following table illustrates the number of cycles it would take for an arm720t and an arm720t with sp7 to perform a number of fft points. all values assume perfect memory: fft points arm720t cycles arm720t+ sp7 cycles speedup 2048 450,000 83,788 5.4 1024 200,000 38,215 5.2 512 90,000 17,282 5.2 256 40,000 7,740 5.2 table 3-2: fft performance for arm versus arm+piccolo
architecture overview 3-10 GMS30C7201 data sheet
4-1 GMS30C7201 data sheet 4.1 arm720t macrocell 4-2 arm720t macrocell 4
arm720t macrocell 4-2 GMS30C7201 data sheet 4.1 arm720t macrocell for details of the arm720t, please refer to the arm720t data sheet (ddi 0087).
5-1 GMS30C7201 data sheet 5.1 piccolo macrocell 5-2 piccolo macrocell 5
piccolo macrocell 5-2 GMS30C7201 data sheet 5.1 piccolo macrocell this section outlines  the features and benefits of piccolo  the integration of piccolo into the GMS30C7201 and provides references to other sources of information. 5.1.1 features and benefits of piccolo the full performance and functionality of a 16-bit fixed-point dsp is added to the arm cpu through the piccolo coprocessor (sp7 core). this is achieved without the high cost of a harvard memory system as used in a conventional dsp architecture.the arm architecture allows sustained single-cycle, multiply-accumulate type instructions from a single memory system. the 32-bit arm memory system is free for high bandwidth data access through the use of a 128-word instruction cache which decouples piccolo instruction fetches from the bus. 5.1.2 piccolo dsp integrated into the GMS30C7201 piccolo is connected as a coprocessor to the arm720t, as shown in figure 5-1: arm720tdsp block diagram below. the combination is referred to as the arm720tdsp. figure 5-1: arm720tdsp block diagram amba data bus arm720t core am ba interface instruction cache amba address bus amba interface out piccolo datapath in
piccolo macrocell 5-3 GMS30C7201 data sheet the simplified diagram figure 5-2: arm720tdsp connected to external memory below shows how the arm720tdsp is connected to external memory. figure 5-2: arm720tdsp connected to external memory the above enables a low cost/high-performance softmodem solution. v34bis (with v42bis compression) softmodem can comfortably run on the GMS30C7201, assuming a 640x240 color lcd and 8bpp operation. 5.1.3 references to other documentation for details of the piccolo macrocell, please refer to the armsp7 data sheet (arm ddi 0089). further information can be found in the following documents:  introduction to piccolo (arm dvi 0006)  arm piccolo dsp benchmarks (arm dvi 0008)  arm signal processing architecture , (arm ddi 0128) ? arm signal processing architecture, architecture reference manual (arm ip 0025) 7201 32-bit rom 16-bit sdram video controllers lcd and rgb 720tdsp includes piccolo, cache and write buffer amba static memory controller sdram controller and write buffer
piccolo macrocell 5-4 GMS30C7201 data sheet
6-1 GMS30C7201 data sheet 6.1 introduction 6-2 6.2 peripheral register map summary 6-5 6.3 high-speed apb peripherals 6-7 memory map 6
memory map 6-2 GMS30C7201 data sheet 6.1 introduction there are five main memory map divisions, outlined in table 6-1: top-level address map . the rom has an address space of 384mbytes which is split equally between six external rom chip selects. pcmcia 0 and 1 have three contiguous 64mbyte pages. note: the 64mbyte address space at the top of the 256mbyte allocated for each pcmcia card is reserved. there is a maximum of 64mbytes of sdram. the mode registers in the sdram are programmed by reading from the 64mbyte address space immediately above the sdram. base address size description 0mbyte 64mbytes 128mbytes 192mbytes 256mbytes 320mbytes 384mbytes 64mbytes 64mbytes 64mbytes 64mbytes 64mbytes 64mbytes 128mbytes rom chip select 0 rom chip select 1 rom chip select 2 rom chip select 3 rom chip select 4 rom chip select 5 reserved 512mbytes 576mbytes 640mbytes 704mbytes 64mbytes 64mbytes 64mbytes 64mbytes pcmcia card 1attribute memory pcmcia card 1common memory pcmcia card 1i/o or secondary common memory reserved 768mbytes 832mbytes 896mbytes 960mbytes 64mbytes 64mbytes 64mbytes 64mbytes pcmcia card 2 attribute memory pcmcia card 2 common memory pcmcia card 2 i/o or secondary common memory reserved 1024mbytes 1040mbytes 1056mbytes 1072mbytes 1088mbytes 1104mbytes 1120mbytes 1136mbytes 1152mbytes 16mbytes 16mbytes 16mbytes 16mbytes 16mbytes 16mbytes 16mbytes 16mbytes 896mbytes sdram chip select 0 sdram chip select 1 sdram chip select 2 sdram chip select 3 sdram mode register chip 0 sdram mode register chip 1 sdram mode register chip 2 sdram mode register chip 3 reserved 2048mbytes 336kbytes peripherals table 6-1: top-level address map
memory map 6-3 GMS30C7201 data sheet the peripheral address space is subdivided into three main areas: those on the asb, the fast apb and the slow apb. the base address for the peripherals is given in table 6-2: peripherals base addresses . amba base address (hex) name description asb peripherals 2gbyte sdramc base sdramc 2gbyte + 0x1000 pmu base pmu/pll 2gbyte + 0x2000 pcmcia base pcmcia 2gbyte + 0x3000 busc base bus controller 2gbyte + 0x4000 dmac base dmac 2gbyte + 0x5000 - 2gbyte + 0xffff reserved fast apb peripherals 2gbyte + 0x10000 video base lcd/vga 2gbyte + 0x11000 ir base mir/fir 2gbyte + 0x12000 usb base usb 2gbyte + 0x13000 sound base sound 2gbyte + 0x14000 - 2gbyte + 0x1ffff reserved pseudo dma 2gbyte + 0x51000 ir base mir/fir - arm accesses as dma bus master 2gbyte + 0x52000 usb base usb - arm accesses as dma bus master 2gbyte + 0x53000 sound base sound - arm accesses as dma bus master 2gbyte + 0x54000 - 4gbyte-1 reserved slow apb peripherals 2gbyte + 0x20000 u1 base uart 1 2gbyte + 0x21000 u2 base uart 2 2gbyte + 0x22000 kbd base kbd 2gbyte + 0x23000 gpio base gpio 2gbyte + 0x24000 intc base intc 2gbyte + 0x25000 timer base timer 2gbyte + 0x26000 spi base spi table 6-2: peripherals base addresses
memory map 6-4 GMS30C7201 data sheet 2gbyte + 0x27000 modem base modem 2gbyte + 0x28000 rtcbase rtc 2gbyte + 0x29000 adcbase adc 2gbyte + 0x2a000 - 2gbyte + 0x4ffff reserved amba base address (hex) name description table 6-2: peripherals base addresses
memory map 6-5 GMS30C7201 data sheet 6.2 peripheral register map summary 6.2.1 asb peripherals for details of the sdram controller registers, please refer to table 8-4: sdram controller registers on page 8-5 for details of pmu/pll registers, please refer to table 7-1: pmu register map on page 7-8 6.2.2 pcmciac register address map for details of pcmcia register address maps, please see table 10-31: register map socket 1 and socket 2 addresses on page 10-21 and table 10-32: test register map on page 10-22 6.2.3 static memory interface register address map for details see table 9-4: static memory controller register map on page 9-7
memory map 6-6 GMS30C7201 data sheet 6.2.4 dmac register summary for details of the dmac registers address map, please refer to table 12-2: dmac register summary on page 12-6
memory map 6-7 GMS30C7201 data sheet 6.3 high-speed apb peripherals 6.3.1 video system address map for details of the video system address map, please refer to table 11-15: lcd register map locations on page 11-25 6.3.2 infra red controller (mir/fir) register address map the ir interface module registers occupy a 4k block of addresses within the fast apb peripheral area of the GMS30C7201 memory map. for details, please see table 12-34: ir interface block registers and their physical addresses on page 12-52 6.3.3 usb register address map for details of the usb register address map, please refer to table 12-41: usb register address map on page 12-62. 6.3.4 sound register address map for details of the sound register address map, please refer to table 12-44: sound control unit register memory map on page 12-70. 6.3.5 slow amba peripherals register map summary for details, please see table 13-1: slow amba peripherals register map on page 13-2. 6.3.6 uart register address map there are two uarts implemented in the design. for details, please see table 13-5: uart register address map on page 13-10. 6.3.7 keyboard register address map for details of the keyboard register address map, please see table 13-16: keyboard interface controller unit register memory map on page 13-25. 6.3.8 gpio register address map for details of the gpio register address map, please see table 13-28: pio register memory map on page 13-36 register description a[4:2] type (r/w) initial value function data register 000 w 00h outgoing data. read returns the value of pad. direction register 001 r/w 00h selects the direction of each io pin. interrupt mask register 010 r/w 00h masks each interrupt source: 0 = disable interrupt (default) 1 = enable interrupt interrupt status register 011 r 00h current interrupt request status (read only): 0 = no interrupt request 1 = interrupt pending (masked interrupt is always 0) table 6-3: gpio registers
memory map 6-8 GMS30C7201 data sheet 6.3.9 interrupt controller register address map for details of the interrupt controller register address map, please refer to table 13-30: interrupt controller register map on page 13-40. 6.3.10 timer registers address map please refer to table 13-33: timer port addresses on page 13-43 for details of the timer port registers. 6.3.11 spi-mmc registers please refer to table 13-35: spi-mmc block register map on page 13-50 for details of the spi-mmc registers. 6.3.12 afe register address map please refer to table 13-49: afe interface register memory map on page 13-62 for details of the afe registers. edge mode register 100 r/w 00h interrupt sources operate as edge mode: 0 = level mode (default) 1 = edge mode clear register 101 w 00h clear pending interrupt source (edge mode only): 0 = no action (default) 1 = clear interrupt source (self-reset) polarity register 110 r/w 00h interrupt sources operate as active high/low 0 = active high mode 1 = active low mode register description a[4:2] type (r/w) initial value function table 6-3: gpio registers
memory map 6-9 GMS30C7201 data sheet 6.3.13 rtc register map please refer to table 13-53: rtc register memory map on page 13-67 for details of the rtc register map. 6.3.14 aic register address map please refer to table 13-55: aic unit register address map on page 13-71 for details of the aic register address map.
memory map 6-10 GMS30C7201 data sheet
7-1 GMS30C7201 data sheet 7.1 overview 7-2 7.2 block diagram 7-3 7.3 power management states 7-5 7.4 power management 7-6 7.5 pmu registers 7-8 pmu & pll 7
pmu & pll 7-2 GMS30C7201 data sheet 7.1 overview the GMS30C7201 is designed primarily for hpc and other portable computing applications. therefore there are 4 operating modes to reduce power consumption and extend battery life.  run - normal operation (typically used when softmodem is in operation and other cpu-intensive tasks)  slow - half-speed operation used when the application interacts with a user (e.g. word processing)  idle - where the cpu operation is halted but peripherals operation continue (such as screen refresh, or serial communications)  sleep & deep sleep - this mode will be perceived as ? off ? by the user, i.e. the contents of sdram are maintained and only the real-time clock is running. there are a number of power management states, (see 7.3 power management states on page 7-5) as described above, and the transition between states is controlled by the pmu. the pmu is an asb slave unit to allow the cpu to write to its control registers, and is an asb master unit to provide the mechanism for stopping the arm core ? s internal clock).
pmu & pll 7-3 GMS30C7201 data sheet 7.2 block diagram figure 7-1: block diagram sub-block descriptions clock generator the clock generator module is responsible for controlling the pll ? s and gating clocks while the outputs of the plls are uncertain and to ensure that clocks are available during test modes and during reset sequences. asb pmu pmu sta te m a ch i n e bclk, bnres generator re g i ste rs asb in t e r f a c e pl (v c l pll fcl pll cc l bclksource vclksource cclksource nreset npor rtc evt npmwakeup clk4k sreqref sac kref fclksource fas tb us bnresout 16 npmuirq nirq p lltst[1:0] pmad apok mring pmbatok nfiq agntpmu areqpmu
pmu & pll 7-4 GMS30C7201 data sheet fclk (arm processor and sdram controller clock) derived from pll3 whose frequency is controllable between 49.7664 mhz and 82.944 mhz. frequency of operation is set using a 6 bit register. there are two methods for updating frequency, depending upon the state of bit 6 of the clock control register clkctl (see clkctl register on page 7-11). if bit 6 is set, then any data written to bits [5:0] of the clkctl register are immediately transferred to the pins of pll3, thus causing the loop to unlock and to mute fclk. this is only a safe mode of operation if pll3 frequency and mark-space ratio is guaranteed to be within limits immediately after the lock detect signal has become active. if bit 6 is not set, then the GMS30C7201 must enter deep sleep mode before bits [5:0] of the clock control register are transferred to pll3. to switch between the two frequencies when bit 6 is not set:  software writes the new value into the clkctl register  set a real time clock alarm to wake the GMS30C7201 in 2 seconds  enter deep sleep mode by writing to the pmumode register  the GMS30C7201 will power up with pll3 running at the new frequency bclk busclock, which is generated by the pmu by dividing fclk by 2. vclk clock for the lcd and vga video controller. frequency selectable between 31.5mhz or 40mhz. the vclk pll is disabled when on bnres is active or when the pmu is put into deep sleep mode. on exit from either of these conditions, the vclk pll must be re-enabled by software. changing frequency: 1 software must first disable the vclk pll, by writing a ? 0 ? to the pll1enable bit of the clkctl register. 2 write the new value to the pll1freq bit. 3 re-enable the vclk pll by writing 1 to the pll1enable bit. cclk clock for the ir comms and the usb. nominally 48mhz. the cclk pll is disabled when bnres active or when the pmu is put into deep sleep mode. on exit from either of these conditions, the cclk pll must be re-enabled by software. pmu state machine the state machine handles the transition between the power management states described below. the cpu can write to the pmu mode registers (which is what would typically happen when a user switches off the device) and the state machine will proceed to the commanded state.
pmu & pll 7-5 GMS30C7201 data sheet 7.3 power management states run the system is running normally. all clocks running (except where gated locally). the sdram controller is performing normal refresh. slow the cpu is switched into fastbus mode, and hence runs at the bclk rate (half the fclk rate). this is the default mode after exiting sleep mode. idle in this mode, the pmu becomes the bus master until there is either a fast or normal interrupt for the cpu, or the peripheral dma controller requests master-ship of the bus. this will cause the clocks in the cpu to stop when it attempts an asb access. entry to this mode can be caused by the cpu writing the pmu_idle value to the pmu mode register when in run or slow modes, or a wakeup signal becoming active when the pmu is sleep or deep sleep modes sleep in this mode, the sdram is put into self-refresh mode, and internal clocks are gated off. this mode can only be entered from idle mode (the pmu bus master must have mastership of the asb before this mode can be entered). the pmu must be bus master to ensure that the system is stopped in a safe state, and is not half way through an sdram write (for example). both the video and communication clocks should be disabled before entering this state. usually this state would only be entered briefly, on the way to entering deep sleep mode. deep sleep in deep sleep mode, the 3.6864mhz oscillator and the pll are disabled. this is the lowest power state available. only the 32khz oscillator runs. the real time clock and the pmu are clocked from this clock. clocked circuitry in the pmu runs from 4khz (ie the rtc clock divided by 8). everything else is powered down, and sdram is in self- refresh mode. this is the normal system ? off ? mode. sleep and deep sleep modes are exited either by a user wake-up event (generally pressing the ? on ? key), or by an rtc wake-up alarm, or by a modem ring indicate event. these interrupt sources go directly to the pmu.
pmu & pll 7-6 GMS30C7201 data sheet 7.4 power management 7.4.1 state diagram figure 7-2: power management state diagram power on reset init run idle sleep sleep deep slow enter run mode (sw control) enter slow mode (sw control) enter idle sw control or lower) ( enter sleep sw control or lower) ( enter deep sleep wakeup event wakeup event interrupt or wakeup event clocks stable
pmu & pll 7-7 GMS30C7201 data sheet wake-up debounce and interrupt the wake-up events are debounced as follows: each of the event signals which are liable to noise ( nreset , rtc , npmwakeup , and modem ring indicator , power adapter condition ) is re-timed to a 250hz clock derived from the low power (4khz) clock. after filtering to a quarter of 250 hz, each event has an associated ? sticky ? register bit. npmwakeup is an external input, which may be typically connected to an ? on ? key. a ? sticky ? bit is a register bit that is set by the incoming event, but is only reset by the cpu. thus should a pll drop out of lock momentarily (for example) the cpu will be informed of the event, even if the pll has regained lock by the time the cpu can read its associated register bit. the npmwakeup , modem, real time clock and power adapter condition inputs are combined to form the pmu interrupt. each of these three interrupt sources may be individually enabled. to make use of the npmwakeup interrupt, (for example) controlling software will need to complete the following tasks:  enable the npmwakeup interrupt bit, by writing 0 to bit 9 of the resetstatus register.  once an interrupt has occurred, read the reset / status register to identify the source(s) of interrupt. in the case of a npmwakeup event, the register will return 0x10.  clear the appropriate ? sticky ? bit by writing a 1 to the appropriate location (in the npmwakeup case, this will be 0x10.). porta wake-up sequence the porta interrupt is or gated with npmwakeup to support additional wake up sources. each porta input signal can be used as a wake up source, they are enabled using the interrupt mask register. after wake up, s/w should program the porta interrupt mask register and/or the pmu resetstatus register. one possible application is to use the ndcd signal, from the a uart interface, as a wake up source, by connecting ndcd to a porta input. in deep sleep mode, ndcd can wake up the system by generating a porta interrupt request to the pmu block. the pmu state machine then returns the system to the operational mode.
pmu & pll 7-8 GMS30C7201 data sheet 7.5 pmu registers the base address of the pmu registers (pmubase) is defined in table 6-2: peripherals base addresses on page 6-3. the offsets from pmubase of the pmu registers are described in table 7-1: pmu register map . pmu mode register this read/write register is written to by the cpu to change mode from run mode or slow mode into a different mode. the encoding is shown below, in table 7-2: mode entry encodings . obviously the register can only be read and written to in run mode or slow mode, since these are the only modes in which the processor can access these registers. therefore, the processor will never be able to read values for modes other than mode 0x00 and mode 0x 01. other values may be read by a test controller so long as clocks are enabled with bit 8 of the dbctr register. see table 7-12: dbctr register bit 8 on page 7-14. address read location write location pmubase + 0x00 pmumode pmumode pmubase + 0x08 piccolo enable piccolo enable pmubase + 0x10 id reserved pmubase + 0x18 bus retract bus retract pmubase + 0x20 resetstatus resetstatusclear pmubase + 0x28 clkctl clkctl pmubase + 0x30 debounce counters (test only) debounce test register pmubase + 0x38 general purpose test general purpose test table 7-1: pmu register map pmumode[2:0] register value pmu mode 0x04 initialisation mode 0x01 run mode 0x00 slow mode 0x02 idle mode 0x03 sleep mode 0x07 deep sleep mode pmumode[3] writing a ? 1 ? to this bit allows pmu to exit deep sleep mode when pins pmbatok and pmadapok are both low.writing a ? 0 ? to this bit prevents the pmu from leaving deep sleep mode when pmbatok and pmadapok are both low table 7-2: mode entry encodings
pmu & pll 7-9 GMS30C7201 data sheet note all other values in the above table are undefined. piccolo enable register piccolo is enabled when arm 7201 comes out of reset. software should disable the piccolo as soon as possible in the reset sequence to conserve power by writing a 0 to this location. subsequently, software should only enable piccolo when running an application that requires piccolo (such as soft modem). id register this read-only register returns a unique chip revision id. revision 0 of the GMS30C7201 device (the first revision), will return the constant value 0x00720100. bus retract register brenable enables correct dma operation when slow peripherals are connected to the external bus. when enabled, bus retracts occur when either npcawait, npcbwait or exprdy are held active by a slow external peripheral for more than the number of clocks specified by brdelay. the bus retract ensures the dma is not stalled for the duration of the slow peripheral bus access reset / status register this read/write register provides status information on power on reset and the pll status. the allocation is a shown in table 7-6: resetstatus register bits . the bits in this register are ? sticky ? bits. for a definition of a sticky bit please refer to wake-up debounce and interrupt on page 7-7. generally, this register will be read each time the arm exits reset mode, so that the arm can identify what event has caused it to exit from reset mode. bit name function 0 picenable enable piccolo coprocessor table 7-3: piccolo enable register bit name function 0 brdelay 0: bus retracts after 8 cycles 1: bus retracts after 12 cycles 1 brenable enables bus retracts table 7-4: bus retract register resetstatus register read bits register bit meaning 0 porstatus 1 plllock1 2 plllock2 table 7-5: table reset and pll status register
pmu & pll 7-10 GMS30C7201 data sheet the meanings of the individual register bits are as defined in table 7-6: resetstatus register bits . 3 plllock3 4 onevt (debounced) 5 rievt (debounced) 6 rtcevt 7 adpator not ok(debounced) 8 warm reset event (debounced) 9 onevt interrupt maskpmu interrupt enable 10 rievt interrupt maskpmu interrupt request / clear 11 rtcevt interrupt mask 12 no external power interrupt mask table 7-5: table reset and pll status register bit bit = 0 bit = 1 porstatus no por since last cleared por since last cleared plllock1 vga pll has been locked since last cleared vga pll has fallen out of lock since last cleared plllock2 comms pll has been locked since last cleared comms pll has fallen out of lock since last cleared plllock3 system pll has been locked since last cleared system pll has fallen out of lock since last cleared onevt no on key event since last cleared on key event since last cleared rievt no modem ring indicate wake-up event since last cleared modem ring indicate wake-up event since last cleared rtcevt no real time clock (rtc) calendar wake-up event since last cleared real time clock (rtc) calendar wake-up event since last cleared powerfailevt no powerfail event since last cleared a powerfail event has occurred since last cleared resetevt no warm reset event has occurred a warm reset event has ocurred since last cleared maskbits [9] disable pmu interrupt from npmwakeup enable pmu interrupt from npmwakeup maskbits [10] disable pmu interrupt from mring enable pmu interrupt from mring maskbits [11] disable pmu interrupt from rtc enable pmu interrupt from rtc table 7-6: resetstatus register bits
pmu & pll 7-11 GMS30C7201 data sheet clkctl register this register is used to control the frequency of pll3, the system clock pll and pll1, the vga clock. six bits are defined which control the frequency of fclk, and a further bit is used to control the frequency of pll1, the vga clock. the default (power on reset) value for this register is 0x1b. maskbits [12] disable pmu interrupt from pmadapok low. enable pmu interrupt from pmadapok low. bit bit = 0 bit = 1 table 7-6: resetstatus register bits (continued) resetstatus register write bits register bit meaning 0 writing a ? 1 ? to this bit causes the npor event flag to be cleared. writing a ? 0 ? has no effect. 1 writing a ? 1 ? to this bit causes the pll1 unlock event flag to be cleared. writing a ? 0 ? has no effect. 2 writing a ? 1 ? to this bit causes the pll2 unlock event flag to be cleared. writing a ? 0 ? has no effect. 3 writing a ? 1 ? to this bit causes the pll3 unlock event flag to be cleared. writing a ? 0 ? has no effect. 4 onevt interrupt clear. writing a ? 1 ? to this bit clears a pending interrupt bit. 5 ri interrupt clear. writing a ? 1 ? to this bit clears a pending interrupt bit. 6 rtc interrupt clear. writing a ? 1 ? to this bit clears a pending interrupt bit. 7 power fail interrupt clear. writing a ? 1 ? to this bit clears a pending interrupt bit. 8 warm reset clear. writing a ? 1 ? to this bit clears the event bit. [12:9] pmu interrupts enable. ? 1 ? enables interrupts to the cpu, ? 0 ? masks such activity. should the enable bit be set to one when one of the debounced event signals is set, then an interrupt will be generated (ie the interrupt is level sensitive, not edge sensitive). 13 warm reset. writing a ? 1 ? causes nreset to be asserted. writing ? 0 ? has no effect. table 7-7: status register write bits clkctl[5:0]: pll3freq function 0x1b 49.7664 mhz table 7-8: clkctl register
pmu & pll 7-12 GMS30C7201 data sheet 0x1c 51.6096 mhz 0x1d 53.4528 mhz 0x1e 55.2960 mhz 0x1f 57.1392 mhz 0x20 58.9824 mhz 0x21 60.8256 mhz 0x22 62.6688 mhz 0x23 64.5120 mhz 0x24 66.3552 mhz 0x25 68.1984 mhz 0x26 70.0416 mhz 0x27 71.8848 mhz 0x28 73.7280 mhz 0x29 75.5712 mhz 0x2a 77.4144 mhz 0x2b 79.2576 mhz 0x2c 81.1008 mhz 0x2d 82.9440 mhz other values reserved clkctl[6]: pll3 frequency update function 0 pll3 frequency control frequency is only updated when pmu exits deep sleep mode (default) 1 pll3 frequency control frequency is updated instantaneously clkctl[7]: pll3mute function 0 pll3 is muted when lock detect = 0 (default) 1 pll3 only muted after npor or nreset. subsequent unlock condition does not mute the clock. allows dynamic changes to the clock frequency without halting execution. care: this only will be legal if pll3 is under-damped (i.e. will not exhibit overshoot in its lock behavior). clkctl[8]: pll1freq function 0 pll1 set to max. frequency = 31.5mhz 1 pll1 set to min. frequency = 40mhz clkctl[9]: pll1enable function 0 pll1 disabled 1 pll1 enabled. output will be gated until pll1 lock detect (ld) is received clkctl[10]: pll2enable function 0 pll2 disabled table 7-8: clkctl register
pmu & pll 7-13 GMS30C7201 data sheet if bit 6 is ? 0 ? when the cpu writes to bits 5:0 of this register, these bits are stored in a temporary buffer, which is not transferred to the pll until the next time the pll lock signal becomes inactive. this means that for a new value to take effect, it is necessary for the device to enter deep sleep mode first. if bit 6 is ? 1 ? the first effect that writing a new value to bits [5:0] will have is that pll3 will go out of lock, and the clock control circuit will immediately inhibit fclk and bclk, without first verifying that sdram operations have completed. debounce counter test register (read) debounce counter test register (write) 1 pll2 enabled. output will be gated until pll2 lock detect (ld) is received dbctr[5:0] function [3:0] prescaler bits [5:4] selected debounce counter bits table 7-9: dbctr register (read) dbctr[2:0] function 0x00 selects debounce counter for npmwakeup 0x01 selects debounce counter for ring event 0x03 selects debounce counter for power adaptor event 0x04 selects debounce counter for warm reset table 7-10: dbctr register bits[2:0](write) dbctr[3] function 1 forces local test mode 0 ntest takes value from input pin dbctr[4] function 1 disables bus request from the pmu to allow cpu to read state machine for test purposes during pmu idle state. 0 normal operation table 7-11: dbctr register bits[3:4] table 7-8: clkctl register
pmu & pll 7-14 GMS30C7201 data sheet in order that the debounce counters (which would normally be clocked from 4khz) may be independently exercised and observed, the counters may be triggered and observed using the above registers. these registers are for testing only and are not required in normal use. reset sequences power on reset. figure 7-3: a cold reset event in the event of removal and re-application of all power to the GMS30C7201, the following sequence may be typical:  npor input is active. all internal registers are reset to their default values. the pmu drives nresetout low to reset any off-chip peripheral devices.  bnres becomes active on exit from the npor condition. clocks are enabled temporarily to allow synchronous resets to operate.  the default frequency of fclk on exit from npor will be 49.7664mhz.  when fclk is stable, the cpu clock is released. if the cpu were to read the reset/status register at this time, it will return 0x10f: dbctr[8] function 1 forces fclk and blck to be active in all pmu states (test purposes only) 0 normal operation table 7-12: dbctr register bit 8
pmu & pll 7-15 GMS30C7201 data sheet  the cpu may write 0x10f to the reset register to clear these flag bits.  the cpu writes 0x20 to the clock control register, which will set a fclk speed of 58.9824mhz. the new clock frequency, however, is not adopted until the pmu has entered and left deep sleep mode.  the cpu sets a rtc timer alarm to expire in approximately 2 seconds  the cpu sets deep sleep into the pmu mode register  the pmu state machine will enter deep sleep mode (via the intermediate states shown in figure 7-2: power management state diagram on page 7- 6).  when the rtc timer alarm is activated, the pmu automatically wakes up into slow mode, but with the new fclk frequency of 58.9824mhz.  the cpu may write 0x620 to the clock control register, which enables cclk and vclk, and retains the new fclk frequency. software generated warm reset figure 7-4: software generated warm reset bit meaning bit 0 set: power on reset event has occurred bit 1 set: pll1 has been ? unlocked ? bit 2 set: pll2 has been ? unlocked ? bit 3 set: pll3 has been ? unlocked ? table 7-13: bit settings for a cold reset event within reset status register
pmu & pll 7-16 GMS30C7201 data sheet  the cpu writes ? 1 ? to the warmreset bit of reset/status register. the pmu drives nreset low.the internal chip reset, bnres is driven low.the pmu detects that the bidirectional nreset pin is low. nreset is filtered by a de- bounce circuit. note that this means that nreset will remain low for a minimum of 16ms. bnres becomes active once the de-bounced nreset goes high once more, which disables pll1 and pll2. the cpu may read the reset register, which will return 0x106: bit meaning bit 1 set: pll1 has been ? unlocked ? bit 2 set: pll2 has been ? unlocked ? bit 8 set: a reset event has occurred. table 7-14: bit settings for a software generated warm reset within reset status register
pmu & pll 7-17 GMS30C7201 data sheet an externally generated warm reset figure 7-5: an externally generated warm reset  nreset is driven to ? 0 ? by external hardware. the nreset input is filtered by a de-bounce circuit. note that this means that nreset must remain low for a minimum of 40ms. bnres (the on-chip reset signal) becomes active as soon as nreset is low, and high once the de-bounced nreset goes high once more. bnres disables pll1 and pll2. the cpu may read the reset register, which will return 0x106: note the internal chip reset, bnres, remains active for 20ms after an externally generated nreset . external devices should not assume that the GMS30C7201 is in an active state during this period. bit interpretation bit 1 set: pll1 has been ? unlocked ? bit 2 set: pll2 has been ? unlocked ? bit 8 set: a reset event has occurred. table 7-15: bit settings for a warm reset within reset status register
pmu & pll 7-18 GMS30C7201 data sheet
8-1 GMS30C7201 data sheet 8.1 sdram controller specification 8-2 8.2 features 8-3 8.3 supported memory devices 8-4 8.4 sdram control registers 8-5 8.5 power-up initialization of the sdrams 8-10 8.6 sdram memory map 8-11 8.7 amba accesses and arbitration 8-15 8.8 merging write buffer 8-17 sdram controller 8
sdram controller 8-2 GMS30C7201 data sheet 8.1 sdram controller specification the system ram resource is provided by sdram, on an interface that is run at the GMS30C7201 ? s core clock frequency. between 2 and 64mbytes of external sdram are supported by one to four external devices. to reduce power consumption, each sdram device has its own clock enable (cke), so each device may individually be placed in low power mode when idle. the sdrams are powered down into self-refresh mode when the whole system is placed in standby mode. internal to the GMS30C7201, the sdram controller arbitrates between access requests from the main amba bus, and a custom video bus. the best use of an sdram is made when data is streamed in sequence, and future access requests can be predicted. it is in the nature of video data to be accessed in sequence at regular intervals; however, sdram accesses from the arm are a lot less predictable. the sdram controller makes use of access predictability to maximize the use of memory interface bandwidth by having simultaneous access to both the lcd and vga address buses. video accesses to the sdram occur in fixed-burst lengths of 16 words, arm and dma controller accesses occur in a fixed-burst length of four words. if the requested accesses are shorter than four words, then the extra data is ignored.
sdram controller 8-3 GMS30C7201 data sheet 8.2 features note the above timings represent the worst case timing. best case timings are at least 25% better. worst case timings assume that all accesses are from different pages in banks that are already open, and that no pipelining occurs between video and asb accesses. clock speed 60mhz (0.35 m process) 100mhz (0.25 m process) external bus interface 16 bits wide (two accesses required for each word). memory 2 ? 64 mbytes in up to four devices. the size of each memory device may be different. programmable cas delays of 1, 2 or 3. supports sdrams organized with either two or four banks with page lengths of 256 or 512 half words. note that the sdrams should be of the same speed grade. programmable auto refresh timer allows correct operation with large range of system clock frequencies. video resolution video bandwidth mbyte/sec arm bandwidth (video active) mbyte/sec arm bandwidth (video inactive) mbyte/sec arm bandwidth (average) mbyte/ sec lcd 640 x 240 15 31.5 39.2 32.7 lcd 640 x 240 vga 640 x 480 47 16 39.2 22.5 vga 800 x 600 40 20 39.2 25.4 table 8-1: 60mhz operation video resolution video bandwidth mbyte/sec arm bandwidth (video active) mbyte/sec arm bandwidth (video inactive) mbyte/sec arm bandwidth (average) mbyte/ sec lcd 640 x 240 15 48.8 57 50 lcd 640 x 240 vga 640 x 480 47 23.6 57 32 vga 800 x 600 40 29.2 57 37 lcd 640 x 480 vga 640 x 480 64 12.5 57 25 table 8-2: 100mhz operation
sdram controller 8-4 GMS30C7201 data sheet 8.3 supported memory devices from 2 ? 64mbytes of sdram are supported with any mixture of up to four of 16-, 64- or 128mbit devices. each of the four external devices are mapped to a 16mbyte boundary, and rely on the memory management unit to map different mixtures of devices (for example, 16- and 64mbit devices) into a continuous address space for the arm. note that 16mbit devices appear eight times, and the 64mbit devices appear twice in the memory map. note the GMS30C7201 can use any mixture of 16-, 64- or 128mbit sdrams. it is the responsibility of software to determine the actual external memory configuration, and to program the memory management unit appropriately. the sdram controller allows up to four banks of memory to be open at once. the open banks may exist in different physical sdram devices. total memory 16mbit devices 64mbit devices 128mbit devices 2mbyte 1 - - 4mbyte 2 - - 8mbyte 4 1 - 16mbyte - 2 1 32mbyte - 4 2 64mbyte--4 table 8-3: sdram upgrade path
sdram controller 8-5 GMS30C7201 data sheet 8.4 sdram control registers the sdram controller has three registers: the configuration, refresh timer and the write buffer flush timer. the configuration register ? s main function is to specify the number of sdrams connected, and whether they are 2- or 4-bank devices. the refresh timer gives the number of bclk ticks that need to be counted in-between each refresh period. the write buffer flush timer is used to set the number of bclk ticks since the last write operation, before the write buffer ? s contents are transferred to sdram. in addition to the sdram control registers, the arm may access the sdram mode registers by writing to a 64mbyte address space referenced from the sdram mode register base address. writing to the sdram mode registers is discussed further in 8.5 power-up initialization of the sdrams on page 8-10. 8.4.1 configuration register address: sdram register base address the sdram controller configuration register is a 32-bit wide split read/write register, such that bits [23:0] should be configured by the arm, and bits [31:24] provide status information that are read-only. all locations containing ? - ? are for future expansion, and should always be programmed with the binary value 0. writes to bits [31:24] are always ignored. e [3:0] device enable - indicates that there is a physical sdram present in each of the four slots in the address map. this bit is used to determine whether an auto-refresh command should be issued to a particular memory device. slot 0 - address range 0 ? 16mbyte slot 1 - address range 16 ? 32mbyte slot 2 - address range 32 ? 48mbyte slot 3 - address range 48 ? 64mbyte value = 1 if a device is present value = 0 if a device is not present b [3:0] indicates whether the sdram in the slot is a 2- or 4-bank device address name description sdramcbase + 0x00 configreg #32-bit r/w sdramcbase + 0x04 refreshtmr #16-bit r/w sdramcbase + 0x08 write buffer flush timer #3-bit r/w table 8-4: sdram controller registers 31 23 15 7 0 s 1 s 0 --- -- rac 1 c 0 dc w pe 3 b 3 -- e 2 b 2 -- e 1 b 1 -- e 0 b 0 --
sdram controller 8-6 GMS30C7201 data sheet value = 1 if a four-bank device value = 0 if a two-bank device c [1:0] cas latency p set priority device for the video bus value = 1 if the vga is the priority device value = 0 if the lcd is the priority device w write buffer enable value = 1 if the write buffer is enabled value = 0 if the write buffer is disabled r normal sdram controller refresh enable value = 1 if the sdram controller provides refresh control value = 0 if the sdram controller does not provide refresh s [1:0] sdram controller status, read-only a auto pre-charge on asb accesses a = 1 auto pre-charge (default) a = 0 no auto pre-charge c [1] c [0] cas latency 0 0 reserved 011 1 0 2 113 table 8-5: cas latency s [0] s [1] status 0 0 idle 01busy 1 0 self refresh 11reserved table 8-6: sdram controller status
sdram controller 8-7 GMS30C7201 data sheet d sdram bus tri-state control d = 0 the controller drives the last data onto the sdram data bus (default) d = 1 the sdram bus is tri-stated except during writes this bit should be cleared before the ic is programmed into a low power mode. driving the data lines avoids floating inputs which could increase device power consumption. during normal operation the d bit should be set, to avoid data bus drive conflicts with sdram. c sdram clock enable control c = 0 the clock enable of all idle devices are de-asserted to save power (default) c = 1 all clock enables are driven high continuously during power-up initialization, it is important that the e[3:0] and the r bits are set in the correct sequence.
sdram controller 8-8 GMS30C7201 data sheet the sdram controller powers-up with e[3:0]=0000 and r=0. this indicates that the memory interface is idle. next, the software should set at least one e bit to 1 with the r bit 0. this will cause all four devices to be precharged (if present). the next operation in the initialization sequence is to auto-refresh the sdrams. note that the number of refresh operations required is device-dependent. set the r bit to 1 and all the e bits to 0000 to start the auto-refresh process. software will have to ensure that the prescribed number of refresh cycles are completed before moving on to the next step. the final step in the sequence is to set the r bit to 1 and to set the e bits corresponding to the populated slots. this will put the sdram controller (and the sdrams) in their normal operational mode. figure 8-1: software example/memory operation diagram software example operation refresh complete? write e[3:0] = 0000 r = 0 write e[3:0] = 0001 r = 0 write e[3:0] = 0000 r = 1 no, wait yes write e[3:0] = according to slot r = 1 end of initialization populated memory operation idle precharge auto-refresh memory refreshing normal operation memory start
sdram controller 8-9 GMS30C7201 data sheet 8.4.2 refresh timer address: sdram register base address + 4 a 16-bit read/write register that is programmed with the number of bclk ticks that should be counted between sdram refresh cycles. for example, for the common refresh period of 16 s, and a bclk frequency of 50mhz, the following value should be programmed into it: 16x10 -6 * 50x10 6 = 800 the refresh timer defaults to a value of 128, which for a 16 s refresh period assumes a worst case (ie. slowest) clock rate of: 128 = 8 mhz 16x10 -6 the refresh register should be written to as early as possible in the system start-up procedure, and in the first few cycles if the system clock is less than 8mhz. 8.4.3 write buffer flush timer address: sdram register base address + 8 a 3-bit read/write register that selects the time-out value for flushing the quad word merging write buffer. the times are given in the following table. timer value bclk ticks between time-outs 0 time-out disabled 12 2 4 38 4 16 532 6 64 7128 table 8-7: write buffer: flush time-out table
sdram controller 8-10 GMS30C7201 data sheet 8.5 power-up initialization of the sdrams the sdrams are initialized by applying power, waiting a prescribed amount of settling time (typically 100 s), performing some auto-refresh cycles (minimum 2) and then writing to the sdram mode register. the exact sequence is sdram device- dependent. the settling time is referenced from when the sdram clk starts. the processor should wait for the settling time before enabling the sdram controller refreshes, by setting the r bit in the sdram control register. the sdram controller automatically provides an auto refresh cycle for every refresh period programmed into the refresh timer when the r bit is set. the processor must wait for sufficient time to allow the manufacturer ? s specified number of auto-refresh cycles before writing to the sdram ? s mode register. the sdram ? s mode register is written to via its address pins (a[13:0]). hence, when the processor wishes to write to the mode register, it should read from the binary address (amba address bits [22:9]), which gives the binary pattern on a[13:0] which is to be written. the mode register of each of the sdrams may be written to by reading from a 64mbyte address space from the sdram mode register base address. the correspondence between the amba address bits and the sdram address lines (a[13:0]) is given in the row address mapping of table 8-8: sdram row/column address map on page 8-11. bits [25:24] of the amba address bus select the device to be initialized. the sdram must be initialized to have the same cas latency as is programmed into c [1:0] bits of the sdram control register, and always to have a burst length of 8.
sdram controller 8-11 GMS30C7201 data sheet 8.6 sdram memory map the sdram controller can interface with up to four sdrams. three sdram sizes are supported ? 16, 64 and 128mbits ? which may be organized in either two or four banks but which must have a 16-bit data bus. a maximum of 64mbytes of memory may be addressed by the sdram controller, which is subdivided into four 16mbyte blocks, one for each of the external sdrams. the mapping of the amba address bus to the sdram row and column addresses is given in table 8-8: sdram row/column address map . the first row of the diagram indicates the sdram address bit (a[13:0]); the remaining numbers indicate the amba address bits mba[23:1]. note that for 16mbit devices, pins a[11,9] on the sdram should be connected to pins a[13,12] on the GMS30C7201, and the pins a[11,9] should not be connected. notes (1) for the 16mbit device, sdram address line a11 should be connected to the GMS30C7201 pin sa[13](bs0), and the sdram address line a9 should be connected to the GMS30C7201 pin sa[12](bs1). the GMS30C7201 address lines a11 and a9 should not be connected. (2) since all burst accesses commence on a word boundary, and sdram addresses are non-incrementing (the address incrementer is internal to the device), column address zero will always be driven to logic ?0?. * an asterisk denotes the address lines that are used by the sdram. the start addresses of each sdram is fixed to a 16mbyte boundary. the memory management unit will be used to map the actual banks that exist into contiguous memory as seen by the arm. bits [25:24] of the amba address bus select the device to be initialized, as described in table 8-9: sdram device selection on page 8-12. sdram addr 13 (bs0) 12 (bs1) 11109876543210 row 16mbit device 10 * 9 * note 1 20 * note 1 19 * 18 * 17 * 16 * 15 * 14 * 13 * 12 * 11 * col 16mbit device 10 9 note 1 20 note 1 23 8 * 7 * 6 * 5 * 4 * 3 * 2 * note 2 row 64mbit device 10 * 9 * 22 * 20 * 21 * 19 * 18 * 17 * 16 * 15 * 14 * 13 * 12 * 11 * col 64mbit device 10 9 222021238 * 7 * 6 * 5 * 4 * 3 * 2 * note 2 row 128mbit device 10 * 9 * 22 * 20 * 21 * 19 * 18 * 17 * 16 * 15 * 14 * 13 * 12 * 11 * col 128mbit device 10 9 22202123 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * note 2 mode write 10 * 9 * 22 * 20 * 21 * 19 * 18 * 17 * 16 * 15 * 14 * 13 * 12 * note 2 summary 10 9 22 20 21 19/23 18/8 17/7 16/6 15/5 14/4 13/3 12/2 11 table 8-8: sdram row/column address map
sdram controller 8-12 GMS30C7201 data sheet figure 8-2: example sdram burst read note if the d bit is cleared (in the sdram configuration register) the gm30c7201 starts driving the data bus immediately after the last read cycle ends. see section 8.4.1 a25 a24 device selected 0 0 device 0 0 1 device 1 1 0 device 2 1 1 device 3 table 8-9: sdram device selection sd[15:0] sclk nsras scke[3:1] sdqml, sdqmu nscas nswe sa[13:0] nscs[0] nscs[3:1] scke[0] active (open bank) command burst read command data bus driven by GMS30C7201 (d=0) (high) (high) data from sdram
sdram controller 8-13 GMS30C7201 data sheet figure 8-3: example sdram burst write note if the d bit is cleared (in the sdram configuration register) the gm30c7201 drives the data lines before and after the write burst sequence. see section 8.4.1 sd[15:0] sclk nsras scke[3:1] sdqml, sdqmu nscas nswe sa[13:0] nscs[0] nscs[3:1] scke[0] active (open bank) command burst write command data bus driven by GMS30C7201 (d=0) (high) data to sdram
sdram controller 8-14 GMS30C7201 data sheet figure 8-4: example sdram refresh, all banks enabled note if the d bit is cleared (in the sdram configuration register) the gm30c7201 drives the data lines to avoid floating inputs. see section 8.4.1 sd[15:0] sclk nsras scke[3:0] sdqml, sdqmu data bus driven by GMS30C7201 if sdram configuration register bit d=0 nscs[3] nscas nswe sa[13:0] nscs[2] nscs[1] nscs[0] precharge (all banks) staggered refresh
sdram controller 8-15 GMS30C7201 data sheet 8.7 amba accesses and arbitration the sdram controller bridges both the amba main and video buses. on the main bus, the sdram appears as a normal slave device. on the video dma bus, the sdram controller integrates the functions of the bus arbiter and address decoder. writes from the main bus may be merged in the quad word merging write buffer. see 8.8 merging write buffer on page 8-17 for more information on this feature. access requests from either the main or video buses are arbitrated by a main/video arbiter according to the following sequence: highest priority: lcd/vga (modified round robin) refresh request lowest priority: main bus peripheral (pmu, arm, piccolo, dma) ? order determined by main bus arbiter. the lcd and vga have nominally the same priority, and are arbitrated using a ? biased round robin ? algorithm. the ? biased round robin ? algorithm in this context means that if both of the video peripherals on the video bus request access at the same time, the video system indicated by the p bit in the control register gets first access, then the video system not selected by the p bit is granted access, regardless of whether the system selected by the p bit is still requesting access. as an example, if the p bit is 1, the vga is given priority, so if both vga and lcd request access at the same time, vga is granted first, then lcd, even if vga is still requesting after its first access. lcd and vga sdram accesses always occur in bursts of 16 words. once a burst has started, data is presented by the sdram controller without wait states. the lcd and vga may only read data from sdram, no write path is supported. if a refresh cycle is requested, then it will have lower priority than either the vga or lcd, but will be higher than any other accesses from the main bus. assuming a worst case bclk frequency of 8mhz, the maximum, worst case latency that the arbitration scheme enforces is 11.5 s before a refresh cycle can take place. this is comfortably within the 16 s limit. note that the four external sdram devices are refreshed on four consecutive clock cycles to reduce the peak current demand on the power source. the arbitration of the main bus is left to the main bus arbiter. data transfers requested from the main bus always occur as a burst of eight half-word accesses to sdram. access requests from the main bus cannot be broken into by the main bus arbiter. in the case where fewer than four words are actually requested by the main bus peripheral, the excess data from the sdram is ignored by the sdram controller in the case of read operations, or masked in the case of writes. in the case where more than four words are actually requested by the main bus peripheral, the sdram controller asserts mblast to force the asb decoder to break the burst. in the case of word misalignment to a quad word boundary (when any of address bits [3:0] are non-zero at the start of the transfer), mblast is asserted at the next quad word boundary (bits 2 and 3 set) to force the asb decoder to break the burst. sequential half word (or byte) reads are not supported. any burst requests for byte or half word reads are broken by the sdram controller asserting blast . this is not an issue, since although the GMS30C7201 includes the thumb processor, which can generate sequential half word accesses, if the cache is enabled, these will become quad word cache line fills. in the case of quad word misalignment, byte or half word access requests from the main amba bus, the data requested by address bits mba[3:2] is accessed from the sdram first.
sdram controller 8-16 GMS30C7201 data sheet in the case of byte or half word reads, data is replicated across the whole of the asb data bus. data bus for word access: data bus for half word access: data bus for byte access: 31 23 15 7 0 d 31 d 30 d 29 d 28 d 27 d 26 d 25 d 24 d 23 d 22 d 21 d 20 d 19 d 18 d 17 d 16 d 15 d 14 d 13 d 12 d 11 d 10 d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 31 23 15 7 0 d 15 d 14 d 13 d 12 d 11 d 10 d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 d 15 d 14 d 13 d 12 d 11 d 10 d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 31 23 15 7 0 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0
sdram controller 8-17 GMS30C7201 data sheet 8.8 merging write buffer an eight word merging write buffer is implemented in the sdram controller to improve write performance. the write buffer can be disabled, but its operation is completely transparent to the programmer. the eight words of the buffer are split into two quad words, the same size as all data transactions to the sdrams. the split into two quad words allows one quad word to be written to at the same time as the contents of the other are being transferred to sdram. the quad word buffer currently being written to may be accessed with non-contiguous word, half word or byte writes, which will be merged into a single quad word. the buffered quad word will be transferred to the sdram when:  there is a write to an sdram address outside the current quad word being merged into  there is a read to the address of the quad word being merged into  there is a time-out on the write back timer the two quad-words that make up the write buffer operate in ? ping-pong ? fashion, whereby one is initially designated the buffer for writes to go into, and the other is the buffer for write backs. when one of the three events that can cause a write-back occurs, the functions of the two buffers are swapped. thus the buffer containing data to be written back becomes the buffer that is currently writing back, and the buffer that was the write-back buffer becomes the buffer being written to. in the case of a write-back initiated by a read from the same address as the data in the merge buffer, the quad word in the buffer is written to sdram, and then the read occurs from sdram. the write before read is essential, because not all of the quad word in the buffer may have been updated, so its contents need to be merged with the sdram contents to fill any gaps where the buffer was not updated. the write buffer flush timer forces a write back to occur after a programmable amount of time. every time a write into the buffer occurs, the counter is re-loaded with the programmed time-out value, and starts to counts down. if a time-out occurs, then data in the write buffer is written to sdram.
sdram controller 8-18 GMS30C7201 data sheet
9-1 GMS30C7201 data sheet 9.1 overview 9-2 9.2 hardware interface and signal description 9-3 9.3 functional description 9-5 9.4 register description 9-7 static memory interface 9
static memory interface 9-2 GMS30C7201 data sheet 9.1 overview the static memory controller interfaces the amba advanced system bus (asb) to the external bus interface (ebi). six separate memory or expansion banks are provided by this block. each bank is 64mb in size and can be programmed individually to support:  8-, 16- or 32-bit wide, little-endian memory  burst mode read access support  variable wait states (up to 16) in addition, bus transfers can be extended using the exprdy input signal. burst mode access allows fast sequential access within quad word boundaries. this can significantly improve bus bandwidth in reading from memory (that must support at least four word burst reads). figure 9-1: static memory controller block diagram bclk dselreg blast bwrite bsize[1:0] bd[31:0] ba[28:26, 5:0] expclk exprdy srama[1:0] bnres external bus interface asb bus ncs[5:0] dselsram bwait berror bootsbit[1:0] bank configuration registers access wait state and burst enable control chip select encoder access sequence control btran[1:0] nwen[3:0] nwef[3:0] nsramoe nsramalatch membyteseq[1:0] nsramoutlen nsramouten[3:0] nsraminlen[3:0] nsraminen
static memory interface 9-3 GMS30C7201 data sheet 9.2 hardware interface and signal description the static memory controller module is connected to the asb bus. table 9-1: static memory controller asb signal descriptions shows the internal bus interface signals to the static memory controller. name type description ba[28:26, 5:0] in system address bus. bd[10:0] inout bidirectional system data bus. bclk in the asb system clock bnres in amba asynchronous reset. this signal is negative active. bwait out this slave response signal is driven when the busc is selected, and is used to indicate if the memory has completed its current transfer. berror out slave response signal. blast out slave response signal. bsize[1:0] in the signals indicate the size of the transfer, which may be byte, halfword or word. btran[1:0] in these signals are used to determine access type. bwrite in when low, read; when high, write. dselsram in when high, this signal indicates that the bus controller is selected. dselreg in when high, this signal indicates that one of the bank configuration registers is selected. exprdy in expansion channel ready. when low, during phase one this signal will force the current memory transfer to be extended. nwen[3:0] out these signals are active low write enables for each of the memory byte lanes on the external bus. nwef[3:0] in these optional connections use pads feedback from the external side of the nwen[3:0] pads. they are used to guarantee address and chip select hold time when any write enable is low. nsramoe out this is the active low output enable for devices on the external bus. ncs[5:0] out active low chip selects. srama[1:0] out these signals form the lower bits of the external address bus. they are used to control accesses to 16- or 8-bit memories when the bus requests an access size larger than the memory. nsramalatch out when low, transparent address latch enable. table 9-1: static memory controller asb signal descriptions
static memory interface 9-4 GMS30C7201 data sheet bmembyteseq[1:0] out these signals control byte sequencing for the data in and data out paths. nsramouten[3:0] out active low byte lane data output driver enables. nsramoutlen out when low, the data path output latch is transparent. nsraminlen[3:0] out each signal controls a byte latch in the data in path. nsraminen out when low bd[31:0] is driven by the ebi. bootsbit[1:0] in configuration input. 00 - select bank 0 as 32-bit memory 01 - select bank 0 as 16-bit memory 10 - select bank 0 as 8-bit memory 11 - reserved name type description table 9-1: static memory controller asb signal descriptions (continued)
static memory interface 9-5 GMS30C7201 data sheet 9.3 functional description the static memory controller has six main functions:  memory bank select  access sequencing  wait states generation  burst read control  byte lane write control these are described below. 9.3.1 memory bank select the chip select signal generation is controlled by ba[28:26] , dsel and bwrite . refer to table 9-2: static memory bank select coding . 9.3.2 access sequencing bank configuration also determines the width of the external memory devices. when the external memory bus is narrower than the transfer initiated from the current master, the internal transfer will take several external bus transfers to complete. 9.3.3 wait states generation the static memory controller supports wait states for read and write accesses. this is configurable between one and 16 wait states for standard memory access, and zero and 15 wait states for burst mode. the static memory controller also allows transfers to be extended indefinitely. this is done by asserting exprdy low. to hold the current transfer, exprdy must be asserted on the falling edge of bclk before the last cycle of the accesses. the transfer cannot complete until exprdy is high for at least one cycle. 9.3.4 burst read control this supports sequential access burst reads of up to four consecutive locations in 8-, 16- or 32-bit memories. dsel ba[28:26] ncs[5:0] memory configuration 0 xxx 111111 not selected 1 000 111110 ncs0 configuration 1 001 111101 ncs1 configuration 1 010 111011 ncs2 configuration 1 011 110111 ncs3 configuration 1 100 101111 ncs4 configuration 1 101 011111 ncs5 configuration table 9-2: static memory bank select coding
static memory interface 9-6 GMS30C7201 data sheet 9.3.5 byte lane write control this controls nwen[3:0] according to transfer width, ba[1:0] and the access sequencing. table 9-3: nwen coding shows the basic coding assuming 32-bit external memory. bsize[1:0] ba[1:0] nwen[3:0] 10 (word) xx 0000 01 (half word) 1x 0011 01 (half word) 0x 1100 00 (byte) 11 0111 00 (byte) 10 1011 00 (byte) 01 1101 00 (byte) 00 1110 table 9-3: nwen coding
static memory interface 9-7 GMS30C7201 data sheet 9.4 register description 9.4.1 register map 9.4.2 configuration register format each of the 8-bit fields in the memory configuration registers defines:  the number of wait states  the bus width  whether expclk is enabled during accesses  whether the bank is connected to a burst mode rom this is shown in figure 9-2: byte fields in the memory configuration register . figure 9-2: byte fields in the memory configuration register address name description buscbase + 00 memcfgr0 memory configuration register 0 buscbase + 04 memcfgr1 memory configuration register 1 buscbase + 08 memcfgr2 memory configuration register 2 buscbase + 0c memcfgr3 memory configuration register 3 buscbase + 10 memcfgr4 memory configuration register 4 buscbase + 14 memcfgr5 memory configuration register 5 buscbase + 18 testreg0 (r/w) 0 test mode bit 1 test reset bit 3 ? 2 external memory width select bit 31 ? 4 reserved buscbase + 1c testreg1 (r) 0 nsramoe 4 ? 1nwen[3:0] 10 ? 5ncs[5:0] 31 ? 11 reserved buscbase + 20 testreg2 (r) 1 ? 0 membyteseq[1:0] 2 sramalatch 10 ? 3srama 31 ? 11 reserved buscbase + 24 testreg3 (r) 0 nsramoutlen 4 ? 1 nsramouten[3:0] 8 ? 5 nsraminlen[3:0] 9 nsraminen 31 ? 10 reserved table 9-4: static memory controller register map 11 10 7 6 3 2 1 0 buren burst read wait state normal access wait state clken memwidth
static memory interface 9-8 GMS30C7201 data sheet table 9-5: values of the memory width field defines the memory width. clken expansion clock enable. setting this bit enables the expclk to be active during accesses to the specified bank. this provides a timing reference for devices that need to extend bus cycles using the exprdy input. back-to-back sequential accesses result in a continuous clock. table 9-6: values of the normal access wait states field defines the values of the normal access wait states field. memory width description 00 32-bit memory access 01 16-bit memory access 10 8-bit memory access 11 reserved table 9-5: values of the memory width field value number of wait states 0000 16 0001 15 0010 14 0011 13 0100 12 0101 11 0110 10 0111 9 1000 8 1001 7 1010 6 1011 5 1100 4 1101 3 1110 2 1111 1 table 9-6: values of the normal access wait states field
static memory interface 9-9 GMS30C7201 data sheet table 9-7: values of the burst read wait states field defines the values of the burst read wait states field. buren burst enable. setting this bit enables burst reads to take advantage of faster access times from memory devices that support burst mode. value number of wait states 0000 15 0001 14 0010 13 0011 12 0100 11 0101 10 0110 9 0111 8 1000 7 1001 6 1010 5 1011 4 1100 3 1101 2 1110 1 1111 0 table 9-7: values of the burst read wait states field
static memory interface 9-10 GMS30C7201 data sheet
10-1 GMS30C7201 data sheet this chapter describes the pcmcia interface. 10.1 overview 10-2 10.2 register description and map 10-10 10.3 functional description 10-23 pcmcia interface 10
pcmcia interface 10-2 GMS30C7201 data sheet 10.1 overview this adapter interfaces between the internal main system bus (amba - asb) and the external pcmcia card bus as shown in figure 10-1: overview of external memory and static memory control on page 10-3 features  supporting two pcmcia2.1/jeida4.2 compliant 68 pin card slots  pcmcia i/f directly connected to amba - asb  3.3v & 5v mixed voltage operation for each pcmcia card  support for low voltage pcmcia card including 3.3 v cis reading  reduced pin assignment using external buffers for data access  address and data bus is shared by using external bus interface  enhanced power management  direct memory mapping.  256mb address space per each slot - attribute memory: 64m, - common memory: 64m, - i/o: 64m, - reserved: 64m  support for ata pcmcia card (including flash memory card)  support for multi-function i/o and mixed memory and i/o card  dma operations to pcmcia card not supported  advanced test interface using tic mode note iois16 and inpack signals are not supported in this spec.
pcmcia interface 10-3 GMS30C7201 data sheet figure 10-1: overview of external memory and static memory control address pcmcia 7 pcmcia card (2 sockets) buffers control address data power controller system power external memory and i/o device 7201 ebi sramc pcmcia interface tic test interface control 1 external control 2 asb address sram 7 address 28 bits data 32 bits address data
pcmcia interface 10-4 GMS30C7201 data sheet figure 10-2: block diagram ba[27:0] ce1,ce2 ciord,ciowd oe,we reg vpp_en0 vpp_en1 vcc5en vcc3en bvd2(spkr) cd1,cd2 rdy/bsy(ireq) wait reset bvd1(stchg/ri) bd[15:0] bwrite bwait dselpcm pcmirq bclk the ebi control signals dselreg bres address change logic address change logic cdata[15:0] cadrv cbdrv control reg. bank control reg. bank bus interface unit bus interface unit power control unit power control unit status checker status checker status reg. bank status reg. bank interrupt generator interrupt generator power management unit power management unit pcmcia hba state machine pcmcia hba state machine caddr[25:0] blast berror vs1,vs2 nspkrout wp(iois16) bsize
pcmcia interface 10-5 GMS30C7201 data sheet figure 10-3: external circuit diagram this diagram describes the external floorplan for pcmcia and the interconnection from the view of system level. this diagram also describes the pin connection with the socket and the controller. 10.1.1 hardware interface and signal description 10.1.2 host bus interface signal the signals listed below go to the pcmcia interface on the asb side. pcmcia card controller external bus interface slot1 slot2 system power supply ebi control signals mic2653a (power control chip) 5v 3.3v 12v nvcc_5en_skt1, nvcc_3en_skt1, vpp_en1_skt1, vpp_en2_skt1, nvcc_5en_skt2, nvcc_3en_skt2, vpp_en1_skt12 vpp_en2_skt12 vcc, vpp1 vpp2 vcc, vpp1 vpp2 3.3v or 5v 12v pcmciaouten0 lcx16245 (16-bit buffer) -bidirectional cadrv cbdrv b_d[15:0] 5v tolerant buffer data[15:0] data[15:0] lcx16244 (16-bit buffer) -unidirectional 5v tolerant buffer * all data line must be pull-downed with 100k register * cd2, cd1, vs2, vs1 : pull-uped with system power * other status pins : pull-uped with card power b_a[25:0] addr[25:0] addr[25:0] lcx16244 (16-bit buffer) -unidirectional 5v tolerant buffer wai t wai t wa i t _ s kt1 wa i t _ s kt2 reset _skt1 reset _skt2 reset reset nreg, noe, nwe nciord, nciowd nreg, noe, nwe nciord, nciowd nreg, noe, nwe nciord, nciowd ncd2, ncd1, vs2, vs1, bvd2, bvd1, wp, rdy/nbsy ncd2, ncd1, vs2, vs1, bvd2, bvd1, wp, rdy/nbsy ncd2, ncd1, vs2, vs1, bvd2, bvd1, wp, rdy/ nbsy : skt2 ncd2, ncd1, vs2, vs1, bvd2, bvd1, wp, rdy/ nbsy : skt1 vcc name type source description bclk input clock controller system bus clock this clock times all bus transfers. ba[28:21] input asb system bus address table 10-1: host bus interface signals
pcmcia interface 10-6 GMS30C7201 data sheet ba[6:2] inout asb upper three bits are required to address translation and lower four bits to configure control register ba[0] input asb upper three-bits are required to address translation and lower four bits to configure control register bd [ 7:0] input asb system data bus these bits are used to configure the control register. all configuration registers are eight bits wide. nbres input asb this signal indicates the reset status of the amba asb bwrite input asb when high, this signal indicates a write transfer and when low, a read.this signal has the same timing as the address bus berror output asb this slave response is driven high during phase one of bclk when a transfer error has occurred. when low the transfer is successful blast output asb this slave response is driven high during phase one of bclk when pcmcia host bus adapter is selected. bwait output asb this slave response is driven high during phase one of bclk when pcmcia host bus adapter is selected and is used to indicate if the pc card has completed its current transfer. the signal is driven low at the end of the cycle. bsize [ 1:0] input asb this signal indicates the size of the transfer which may be byte, half-word or word. when high, this signal indicates that one of the configuration registers is selected. dselpcm input amba decoder this signal changes in phase two of bclk. when high, this signal indicates that one of the configuration registers is selected. dselreg input amba decoder this signal changes in phase two of bclk. name type source description table 10-1: host bus interface signals (continued)
pcmcia interface 10-7 GMS30C7201 data sheet 10.1.3 pcmcia card slot interface the signals listed below connect between the interface and the pcmcia card. name type description *nce2 output card data bus high byte enable *nce1 output card data bus low byte enable *nciord output card i/o read this signal is valid for i/o pcmcia cards *nciowd output card i/o write this signal is valid for i/o pcmcia card. *noe output output enable for memory pcmcia card. *nwe output write enable for memory pcmcia card. nreg output when this signal is low, memory access is restricted to attribute memory space. *ncd1, ncd2 input card detect input 1 and 2 *vs1, vs2 input when this signal is low, memory access is limited to attribute memory space. *bvd1 (nstschg/nri) (i/o card) input the battery voltage detect input 1 on the memory pcmcia card. during normal access for i/o, this signal must be kept low. in i/o card, this signal is used as card status change or ring indicate input according to the host bus adapter ? s configuration setting. *bvd2 (spkr#) input the battery voltage detect input 2 on the memory pcmcia card. in i/o card, this signal is used as speaker input. *rdy/nbsy (nireq) input ready/nbusy input on the memory pcmcia card. in i/o card, this signal is used as interrupt request signal. table 10-2: pcmcia card slot interface
pcmcia interface 10-8 GMS30C7201 data sheet *the signals marked with an asterisk are required for each socket interface. 10.1.4 other control signals these outputs from the GMS30C7201 do not connect to the pcmcia card. note nspkrout is supplied to the system speaker to provide a single amplitude on/off binary audio wave. in the example, the modem card can use this signal to inform the system user that they are being called. *wp (niois16) input write protect input on the memory pcmcia card in i/o card, this signal is used to indicate the i/o data size. *nwait output bus cycle wait input from pcmcia card *reset input card reset output ninpack no conn not used in this specification. name type description table 10-2: pcmcia card slot interface (continued) name type destination description nspkrout output system speaker speaker output. passes through nspkr from an i/o pcmcia card. pcmirqskt1 output interrupt controller interrupt source for socket 1 pcmirqskt2 output interrupt controller interrupt source for socket 2 nvcc5en output power logic power control (5v) nvcc3en output power logic power control (3v) vppen0 output power logic program power supply control 0 vppen1 output power logic program power supply control 1 cadrv output external buffer when high, socket1 is active. this signal selects the data path. cbdrv output external buffer when high, socket1 is active. this signal selects the data path. table 10-3: other control signals
pcmcia interface 10-9 GMS30C7201 data sheet 10.1.5 ebi (external bus interface) timing control signals these signals come from the pcmcia interface and go to the external bus interface (ebi). name type destination description pcmciaen output ebi this signal informs ebi that pcmcia host bus adapter wants to transfer data. npcmciaouten[1:0] output ebi this signal informs ebi that current cycle is a write cycle and also indicates the write byte size. npcmciaoutlen output ebi ebi output data latch enable signal npcmciainen output ebi this signal informs the ebi that current cycle is read cycle. npcmciainlen[3:0] output ebi ebi address latch enable signal npcmcialatch output ebi address latch enable signal pcmciabyteseq[1:0] output ebi control s the data sequence byte lane selectedba[6:0] output ebi these bits are multiplexed with ba [25:21,1:0] at ebi table 10-4: external bus interface (ebi) timing control signals
pcmcia interface 10-10 GMS30C7201 data sheet 10.2 register description and map interface status register (read only): denotes the state of socket status note for bit1 ? bit0: 00 battery dead 01 battery warning 10 battery dead 11 battery good bits description 7 voltage sense 2 input status high=voltage present 6 voltage sense 1 input status high=voltage present 5 rdy/nbsy at memory only card interface 0 : busy 1: ready in i/o or mixed memory and i/o card interfaces this signal indicates the status of nireq pin of the connected card 4 memory write protected at memory only card interface 0 : not write protected 1: write protected in i/o or mixed memory and i/o card interface this signal indicates the status of niois16 pin of connected card. (however, niois16 pin is not supported in this specification so, this has no meaning.) 3 ? 2 card detect 2 and card detect 1.these bits are asserted simultaneously and indicate a card is present and is fully seated in the socket. 1 bvd2 battery voltage detect2 in the i/o card, this denotes the current status of the nspkr. it does not show interrupt status. see note. 0 bvd1 battery voltage detect1 in the i/o card, this denotes the current status of the nstschg / nri . if the ring enable bit is set, it does not show interrupt status.see note. table 10-5: interface status register bits
pcmcia interface 10-11 GMS30C7201 data sheet card status change register the card status change register contains the status for the sources of the card status change interrupt. these sources can be enabled to generate a card status change interrupt by setting the corresponding bit in the card status change interrupt configuration register. there are two ways to reset this register:  read the card status change register  write back in the card status change register after setting explicit write back card status change acknowledge bit to 1 in the global control register power and resetdrv control register this register controls the power. bit description 7 software card detect change 6 card detect change 5 interrupt request from pcmcia card 0: no interrupt request (for pulse mode interrupts) 1: pulse mode interrupt requested ( ireq pin from card) 4 if ring indicate enable bit is 0 and nstschg/nri is 0, then this bit is 1. otherwise this bit is 0. 3 ring indicate change 2 ready change 1 battery warning condition. no meaning in i/o card 0 battery warning condition. no meaning in i/o card table 10-6: card status change register bits bit description 7 host bus adapter softreset setting this bit resets the hba 6 output enable. if this bit is set to 0, the output signals nce2, nce1, nciord, nciowr, noe, nreg, reset, and nwe are tristated. 5 auto power switch enable. 1: automatic socket power switching based on card detect is enabled. 4 socket power control bit 0: vcc5en = 1, vcc3en = 1 1: bit 1 and bit 0 determine vcc5en , vcc3en values table 10-7: power and resetdrv control register
pcmcia interface 10-12 GMS30C7201 data sheet card detect and global control register the card detect and global control register controls the operation of the host bus adapter (hba) 3 ? 2 socket programming control bits 11 vppen2 = 1 vppen1 =1 10 vppen2 = 1 vppen1 =0 01: vppen2 = 0 vppen1 =1 00: vppen2 = 0, vppen1 =0 1 direct 5v/3.3v switch enable vs1 controls the socket power when this bit is high, then pin vs1controls voltage selection. if pin vs1 is low, vcc5en is active. if pin vs1 is high, vcc3en is active 0 voltage selection bit. this can only be used when bit 1 above is low. 0: vcc5en is activated if bit 4 is set 1: vcc3en is activated if bit 4 is set bit description 5 pc card reset. setting this bit to 1 activates the reset signal to the pc. card. the reset signal is active until this bit is set to 0. 4 software card detect interrupt. if card detect enable bit is set to1 in the card change interrupt configuration register, then writing 1 to s/w card detect bit in the card detect and general control register will cause a card detect and status change interrupt. this interrupt source is set when the pcmcia card exits from the card power down mode 3 pc card type 0:memory card 1: i/o card 2 io card access type 0: accessed i/o address range has 8 bit register 1: accessed i/o address range has 16 bit register 1 explicit write back card status change acknowledge bit. setting this bit to 1 will require an explicit write back of a ? 1 ? to the status change register bit which indicates an interrupt condition to acknowledge the interrupt. when this bit is 0 (default value) , the card status change interrupt is acknowledged by reading the card status change register, and the register bits are cleared on a read. 0 : no write back is required 1: write back is required bit description table 10-7: power and resetdrv control register (continued)
pcmcia interface 10-13 GMS30C7201 data sheet card status interrupt configuration register: masking register for interrupt 0 card power down mode 0: power is supplied to socket 1: power is not supplied to socket. card power down mode although the pc card is in the socket, the power is not supplied to the socket. so, there are large system power savings.software card detect interrupt is required to exit from card power down mode bit description 7 ring indicate / status changed mask 0 : ri/nstschg interrupt masked 1: ri/nstschg interrupt enabled 6 card detect enable 1 for enable 0 for masking 5 ? 4 pc card generated interrupt ( nireq ) enable 00: pc card generated interrupt ( nireq ) is not enabled 01 the level-mode ireq interrupt request signal is accepted an interrupt occurs when 0 is detected at nireq pin. 10: the pulse-mode ireq interrupt request signal is accepted an interrupt is occurs when the falling edge is detected from nireq pin 11: the pulse-mode ireq interrupt request signal is accepted an interrupt is occurs when the rising edge is detected from ireq pin. 3 ring indicate enable 1 for enable 0 for masking (no meaning in memory card) 2 ready enable 1for enable 0 for masking (no meaning in i/o card) 1 battery warning enable 1 for enable 0 for masking 0 battery dead enable 1 for enable 0 for masking in i/o card, if ring indicate enable bit is 0, nstschg to 0 interrupt source is enabled table 10-9: card status interrupt configuration register bit description
pcmcia interface 10-14 GMS30C7201 data sheet memory area access timing control register bit7: reserved bits 6 ? 4: wait control bits table 10-10: bits 6-4 wait control bits bit 3?bit 2: noe/nwe assertion control bits bit1?bit0: noe/nwe negation control bits table 10-12: bits 1-0 negation control bits i/o area access timing control register bit7: reserved bit description 6-4 wait control bits 000: 5 clock wait state 001: 6 clock wait state 010: 7 clock wait state 011: 9 clock wait state 100: 11 clock wait state 101: 12 clock wait state 110: 14 clock wait state 111: 28 clock wait state bit description 3 ? 2 delay times 00: 0.5 clock delay 01: 1.5 clock delay 10: 3.5 clock delay 11: 5.5 clock delay table 10-11: bits3-2 clock delays bit description 1 ? 0 number of wait states 00: 0.5 clock delay 01: 1.5 clock delay 10: 3.5 clock delay 11: 5.5 clock delay
pcmcia interface 10-15 GMS30C7201 data sheet bit6 ? bit4: wait control bits table 10-13: bits 6?4 wait control bits bit3 ? bit2: noe/nwe assertion control bits table 10-14: bits 3-2 assertion control bits bit1 ? bit0: noe/nwe negation control bits table 10-15: bits 1?0 negation control bits default value for i/o access => bit6 ? bit0 = 100 10 01 ata control register: ata interface control register bit description 6 ? 4 wait control bits 000: 5 clock wait state 001: 6 clock wait state 010: 7 clock wait state 011: 9 clock wait state 100: 11 clock wait state 101: 12 clock wait state 110: 14 clock wait state 111: 28 clock wait state bit description 3 ? 2 delay times 00: 0.5 clock delay 01: 1.5 clock delay 10: 3.5 clock delay 11: 5.5 clock delay bit description 1 ? 0 number of wait states 00: 0.5 clock delay 01: 1.5 clock delay 10: 3.5 clock delay 11: 5.5 clock delay bit description 7 reserved 6 reserved 5 in ata mode, the value of this bit appears at ca25 table 10-16: ata interface control register
pcmcia interface 10-16 GMS30C7201 data sheet recommended value for access timing control register 10.2.1 test mode registers the following registers are used for test purposes only. each input test register ? s output bit is multiplexed with the corresponding input signal of amba or pcmcia input signal to the designed pcmcia host bus adapter. so, in test mode, the function of designed pcmcia hba can be done exactly. output signals are also stored in the output test reg- isters and can be read by the host in test mode.these test registers are enabled only test mode and can be reset by the command of host. by using this scheme of test methodology, the function of pcmcia host bus adapter can be exactly examined without the help of other system peripheral blocks because all input signals and output signals which communicate with other peripherals are derived from input test registers and stored into output test registers. only critical system components such as the bus decoder and arbiter and test mode controller which act as bus master are required for testing. the following test register description gives only the information about the counterpart signal of normal operation. 4 in ata mode, the value of this bit appears at ca24 3 in ata mode, the value of this bit appears at ca23 2 in ata mode, the value of this bit appears at ca22 1 in ata mode, the value of this bit appears at ca21 0 ata mode bit ? 0 ? : pcmcia mode (i/o mode) ? 1 ? : ata mode memory card recommended value 100 ns 0 000 00 00 150 ns 0 000 01 01 200 ns 0 001 01 01 250 ns 0 010 01 01 300 ns 0 01101 01 600 ns read:0 110 10 10 write:0 110 10 10 i/o register x 010 10 01 table 10-17: access timing control register values bit description table 10-16: ata interface control register
pcmcia interface 10-17 GMS30C7201 data sheet test mode control register bus address input test register bit description 7 socket 1 0: no hba power down mode 1: hba enters power down mode. card status monitoring unit also enters power down. all of the module (except control register which should inform the wake up from power down) enters power down mode. so, the controller is in the minimum power consumption mode. 6 socket 2 power down mode 0: no hba power down mode 1: hba enters power down mode. card status monitoring unit also enters power down. all of the module (except control register which should inform the wake up from power down) enters power down mode. so, the controller is in the minimum power consumption mode. 5 power down mode 0: no power down mode 1: power down mode enable in this mode, only address change logic enters the power down mode and bclk is masked. other parts of controller do not enter power down and are active, including bclk . 4 test mode enable bit 3 test clock bit in test mode this bit acts on the clock. 2 test mode register reset bit 1: test mode enabled 1 nwait of socket 1 0 nwait of socket 0 table 10-18: test mode control register bit description 7 ? 0 ba[28:21] table 10-19: bus address input test register
pcmcia interface 10-18 GMS30C7201 data sheet bus control input test register socket 1 status input test register socket 2 status input test register bit description 7 ? 6 reserved 5 dselreg 4 ba[1:0] 3 dselpcm 2 bwrite 1 ? 0 bsize[1:0] table 10-20: bus control input test register bit description 7 ? 6 inverse of nvs2 and nvs1 5 rdy/nbsy 4 wp 3 inverse of ncd2 2 inverse of ncd1 1 bvd2 0 bvd1 table 10-21: socket 1 status input test register bit description 7 ? 6 inverse of nvs2 and nvs1 5 rdy/nbsy 4 wp 3 inverse of ncd2 2 inverse of ncd1 1 bvd2 0 bvd1 table 10-22: socket 2 status input test register
pcmcia interface 10-19 GMS30C7201 data sheet slave access output test register ebi output test register1 ebi output test register2 power control output test register bit description 7 ? 4 reserved 3 bwait 2 berror 1 blast 0 nspkrout table 10-23: slave access output test register bit description 7 ? 6 reserved 5 pcmciaen 4 npcmciaoutlen, 3 npcmciainen 2 npcmcialatch 1 ? 0 pcmciabyteseq[1:0] table 10-24: ebi output test register1 bit description 7 ? 6 reserved 5 ? 4 npcmciaouten[1:0] 3 ? 0 npcmciaouten[3:0] table 10-25: ebi output test register 2 bit description 7 socket 1 power control signal nvcc5en table 10-26: power output control test register
pcmcia interface 10-20 GMS30C7201 data sheet address change output test register1 address change output test register2 (socket 1 access signal) 6 socket 1 power control signal nvcc3en 5 socket 1 power control signal vppen2 4 socket 1 power control signal vppen1 3 socket 2 power control signal nvcc5en 2 socket 2 power control signal nvcc3en 1 socket 2 power control signal vppen2 0 socket 2 power control signal vppen1 bit description 7 reserved 6 ? 0 selectedba[6:0] table 10-27: address change output test register1 bit description 7 ? 6 reserved 5 nce2 4 nce1 3 nciord 2 nciowd 1 noe 0 nwe table 10-28: address change output test register2 bit description table 10-26: power output control test register (continued)
pcmcia interface 10-21 GMS30C7201 data sheet address change output test register3 (socket 2 access signal) interrupt output test register 10.2.2 register map bit description 7 ? 6 reserved 5 nce2 4 nce1 3 nciord 2 nciowd 1 noe 0 nwe table 10-29: address change output test register 3 bit description 7 ? 5 reserved 6-4 cadrv , cbdrv , nreq 3-2 resetskt1 , resetskt2 1-0 pcmirqskt1 , pcmirqskt2 table 10-30: interrupt output test register register name socket 1 address socket 2 address description interface status register baseaddress + 0h0000 baseaddress + 0h0020 # 8-bit r/o card status change register baseaddress + 0h0004 baseaddress + 0h0024 # 8-bit r/w power and resetdrv control register baseaddress + 0h0008 baseaddress + 0h0028 # 8-bit r/w card detect and global control register baseaddress + 0h000c baseaddress + 0h002c # 8-bit r/w card status interrupt configuration register baseaddress + 0h0010 baseaddress + 0h0030 # 8-bit r/w memory area access timing control register baseaddress + 0h0014 baseaddress + 0h0034 # 8-bit r/w i/o area access timing control register baseaddress + 0h0018 baseaddress + 0h0038 # 8-bit r/w ata control register baseaddress + 0h001c baseaddress + 0h003c # 8-bit r/w table 10-31: register map socket 1 and socket 2 addresses
pcmcia interface 10-22 GMS30C7201 data sheet 10.2.3 test register map register name address description test mode control register baseaddress + 0h0040 # 8-bit r/o bus address input test register baseaddress + 0h0044 # 8-bit r/w bus control input test register baseaddress + 0h0048 # 8-bit r/w socket 1 status output test register baseaddress + 0h004c # 8-bit r/w socket 2 status output test register baseaddress + 0h0050 # 8-bit r/w slave access output test register baseaddress + 0h0054 # 8-bit r/w ebi output test register1 baseaddress + 0h0058 # 8-bit r/w ebi output test register2 baseaddress + 0h005c # 8-bit r/w power control output test register baseaddress + 0h0060 # 8-bit r/w address change output test register1 baseaddress + 0h0064 # 8-bit r/w address change output test register2 baseaddress + 0h0068 # 8-bit r/w address change output test register3 baseaddress + 0h006c # 8-bit r/w interrupt output test register baseaddress + 0h0070 # 8-bit r/w table 10-32: test register map
pcmcia interface 10-23 GMS30C7201 data sheet 10.3 functional description 10.3.1 socket 1 and socket 2 access to reduce the external pin count, common data and address signals are used for socket 1 and socket2 with two additional control signals ( cadrv, cbdrv ) . this scheme dramatically reduces the external pin count with some burdens of board level system design. an external buffer selects the exact path. address and data paths uses ebi for the same reason above. and to meet the wide range of address setup time and hold time of various pcmcia card according to the access time deference, some software control method is used. access timing control register is used for this scheme . the access time of pcmcia card is relatively very slow when compared to the host system operating clock speed. so, the controller must provide some signal e.g, bwait , to inform the host that current access has not finished . three wait conditions guarantee normal operation. see figure 10-4: memory read cycle with wait : 1 default wait until pcmcia card drives the wait 2pcmcia card driven wait 3 additional wait to meet the long address hold time - and-ored to inform the host of the state of current access figure 10-4: memory read cycle with wait addr -reg a0 -ce1 a25:a1 -ce2 -oe -we -wait data cycle time setup command hold d7:d0(odd byte) 12 3
pcmcia interface 10-24 GMS30C7201 data sheet a total of 256 mbytes address range is allocated for each pcmcia card. (so, there is no need for an address window as an isa based pcmcia card controller is used to access a total 64 mbyte with very small system address range.) for the fast access support of mixed i/o and memory card, each region has 64m byte address range. also, the iois16 signal is not used. note external buffer requirement: the external buffer must operate in both 3.3v and 5.0v to support low power cards. cadrv and cbdrv control the external buffer to pass the correct signals to the socket. lcx16244 is the 5v tolerant buffer which has the enable pin. the data buffer must be bidirectional. this bidirectional port can be easily controlled with an additional control pin. lcx16245 is the 5v tolerant buffer which has an enable pin and a direction control pin. the pcmciaoutlen can be used for direction control pin of the lcx16245. controller pad requirement: pads must tolerate 5v input from 5v pcmcia card. 10.3.2 interrupt handling interrupt handling is the most important role in the pcmcia host bus controller. interrupts are generated from two different sources, the card status change interrupt and a card-generated interrupt which requires host ? s attention, e.g, data transmission buffer is full, so, it ? s requires some read operation from the host. today, pcmcia cards can generate level mode or pulse mode interrupts. a different mechanism is required for card status change interrupt handling. this interrupt source is monitored and change status is saved in relevant registers, the interface status register and card status change register. card status change includes the insertion or removal of the card, battery warning or dead, and so on. only level mode interrupt is used in this type of interrupt source. each interrupt can be masked by setting the corresponding bit of the card status interrupt configuration register. the host can know the exact interrupt source by reading the interface status register and card status change register. 10.3.3 enhanced power management three power down operations are mode supported for enhanced power management. most power is saved by disabling the clock to inactive blocks. power down is entered under software control. table 10-34: power down modes provides a summary. address range function area 0 - 64 mbyte attribute memory area 64 - 128 mbyte common memory area 64 - 192 mbyte i/o area 192 - 256 mbyte reserved for future use table 10-33: address ranges and function areas mode summary partial power down interrupts still operate (to monitor card changes). full power down all internal control logic disabled.
pcmcia interface 10-25 GMS30C7201 data sheet 10.3.4 internal register access the internal register of the interface is accessed directly. that is, no indirect addressing method is used. the internal address decoder generates the read/write strobe for each register. these registers are reset by the bnres signal when the system is power on. software reset can also be used when a card is removed from each socket. 10.3.5 support for compact flash memory compact flash memory card is supported by the controller. compact flash can be supported in either i/o or memory interface. but no dedicated true ied interface mode is supported. ata interface can be used to support this type of card. in general, an external interconnection socket is required because compact flash uses 50 pin interface. 10.3.6 general operation flow initial state : all registers reset to default initial value. card is not inserted in the socket. card detected : card is inserted in socket. power up sequence is performed (fully software supported) hardware support is limited to card ? s operating voltage level detect. cis is read by default state. pcmcia spec defines the default timing and control for cis reading hardware is programmed by using the cis information (memory only card or memory or io card). normal operation : card access is performed. access timing control is done by atc register and card - driven wait signal. iois16 signal is not supported. so, only 16 bit register io card and 8 bit register io card is supported address and data line uses the ebi (external bus interface). status change : card status is changed at both type of pcmcia card. controller informs the status change using interrupt status change interrupt. this interrupt can be masked by using csic register. card removal : all internal register is reset. card power down power removed from card (maximum power saving). mode summary
pcmcia interface 10-26 GMS30C7201 data sheet 10.3.7 access timing spec of attribute memory read and write the attribute memory ? s access time is defined as 300ns at 5v vcc or 600ns at 3.3v vcc.see chapter 15, electrical characteristics for timing values. figure 10-5: read timing diagram addr[25:0], nreg nce1, nce2 noe nwait d[15:0] t su (a) t su (ce) t v (wt-oe) t en (oe) data valid t w (wt) t v (wt) t a (oe) t a (ce) t a (a) t h (ce) t v (a) t h (a) t c (r) t dis (ce) t dis (oe)
pcmcia interface 10-27 GMS30C7201 data sheet write timing figure 10-6: write timing diagram addr[25:0], nreg nce1, nce2 noe nwait data input established d[15:0](in) nwe d[15:0](out) t en (we) t en (oe) t h (d) t h (oe-we) t su (d-weh) t w (wt) t v (wt) t v (wt-we) t dis (oe) t dis (we) t su (oe-we) t w (we) t su (a) t rec (we) t h (ce) t su (a-weh) t su (ce) t su (ce-weh) t c (w)
pcmcia interface 10-28 GMS30C7201 data sheet
11-1 GMS30C7201 data sheet 11.1 overview 11-2 11.2 video operation 11-3 11.3 video control register 11-7 11.4 lcd timing 0 register 11-9 11.5 lcd timing 1 register 11-11 11.6 lcd timing 2 register 11-13 11.7 vga timing 2 register 11-16 11.8 vga timing 3 register 11-17 11.9 lcd dma base address register 11-18 11.10 lcd dma channel current address register 11-19 11.11 lcd controller status/mask and interrupt registers 11-20 11.12 lcd palette registers 11-22 11.13 vga test register 11-23 11.14 grayscaler test registers 11-24 11.15 video controller register locations 11-25 lcd & vga controllers 11
lcd & vga controllers 11-2 GMS30C7201 data sheet 11.1 overview the vga and lcd controllers provide the video output capabilities of the GMS30C7201. the vga and lcd controllers can be used simultaneously, and can display either the same image, or entirely different images. if the images are the same for the two displays, and the frame rates required are also the same, then it is possible to use the same frame buffer for both controllers. if either the images are different, or different frame rates are required, then it is necessary to use two frame buffers, or one frame buffer, but with two dma channels. in either case, the dma bandwidth required for the two video sub-systems is the sum of the bandwidth for each display, whereas if the two images and the frame rates are the same, then only one dma channel is used, and the dma data is shared between the two controllers. 11.1.1 lcd features  single panel color and monochrome stn displays  tft color displays  resolution programmable up to 640x480  single panel mono stn displays with either 4- or 8-bit interfaces  15 grey-level mono support, 3375 color stn support  4bpp mono, 4 or 8bpp palettized color displays  12bpp color ? true-color ? non-palettized color displays  programmable timing for different display panels  3 x 256 entry, 4-bit palette ram  patented grayscale algorithm  little-endian operation note the controller does not support dual panel stn displays. there is no hardware cursor support, since wince does not use a cursor. 11.1.2 vga features  resolution programmable up to 800x600 resolution (640x480 maximum for simultaneous display mode)  programmable border color  programmable vga timing  on-chip video dacs for direct drive of a monitor  option to share video data with lcd interface  4bpp, 8bpp and 16bpp modes  5:5:5 and 5:6:5 16bpp ? true-color ? modes  3 x 256 entry 8-bit palette ram  patented technique for selecting 2 16 colors from 2 24 colors in 16bpp mode  little-endian operation note the controller does not support interlaced displays. it supports non-interlaced monitor output only, and therefore cannot be used as a television display. there is no hardware cursor support, since wince does not use a cursor.
lcd & vga controllers 11-3 GMS30C7201 data sheet 11.2 video operation a block diagram of the video system is shown in figure 11-1: video system block diagram . the video system has two separate data paths. one data path is for stn lcd and for tft lcds, and the other data path is for the vga controller. if the frame rate and display resolution are the same for the lcd and vga, and if the images are the same, it is possible to share the dma data between the two data paths, by writing dma data into both the input fifos. sharing dma data between the data paths has some restrictions in the programming of the vga and lcd timing information. this is explained in 11.2.6 sharing vga and lcd data on page 11-6. figure 11-1: video system block diagram 11.2.1 vga data path the vga data path is the simpler of the two data paths. data is received from the video asb bus into a 32 deep by 32-bit wide asynchronous fifo. the fifo data is then extracted into a holding latch, and multiplexed down to a pixel at a time. this logical pixel data is then passed to the palette ram. the palette ram is composed of three 256 x 8-bit rams. there is a ram array for each of the r, g and b color components of a pixel. the physical pixel data from the palette ram is then passed to the three video dacs. fifo 32x32 fifo 32x32 palette 256x12 palette 256x24 gray- scale video dacs format fifo 3x8 tft vga timing generator lcd timing generator vga dma control lcd/tft data path vga data path dma data in vga dma request lcd dma control lcd dma request register & palette apb i/f fast apb interface to vga monitor to lcd panel vga control signals lcd control signals vga address lcd address
lcd & vga controllers 11-4 GMS30C7201 data sheet palette ram, and 16bpp mode logical pixels are either 4, 8 or 16 bits. in 4- and 8-bit modes, the logical pixel value is used to index into the three palette arrays to select the three color components of the physical pixel value. in 16-bit pseudo true-color mode, a patented technique is used to allow 2 16 colors to be selected from 2 24 possible colors. separate color gun values are independently used to index into the three palette arrays, to select an 8-bit value for each of the color guns. by splitting the palette ram into three separate ram arrays, it allows 16-bit mode to generate 8-bit color gun data. the method used is an arm patented technique, where 16bpp data is split into three over-lapping 8-bit fields that are used to index into the three ram arrays. the red gun is indexed by bits 15:8 of the 16-bit pixel value, the blue gun is indexed by bits 7:0 of the pixel value, and the green gun is indexed by bits 11:4 of the pixel value. by programming the palette with the correct values, 5:5:5, 5:6:5, 4:8:4, and many other combinations of 16-bit data may be used. thus: 4 bpp 16 palette entries are used for each palette array. all three palette rams are indexed by pixel[3:0] 8 bpp 256 palette entries are used for each palette array. all three palette rams are indexed by pixel[7:0] 16 bpp 256 palette entries are used for each palette array. red array is indexed by pixel[15:8], green array is indexed by pixel[11:4], and blue array is indexed by pixel[7:0] 11.2.2 vga control the control logic for the vga block consists of 3 main blocks.  a video timing generator block this divides down the pixel clock from the video pll and produces the timing control signals ( vsync , hsync , whether it is video data or border color to be displayed) for the monitor and video dacs.  a dma bus control block this generates the dma address for the sdram controller and generates the dma request signal to the sdram controller, and controls receiving the dma data, and writing it into the vga fifo.  a register slave interface this resides on the fast peripheral bus and allows registers to be written from the processor. the registers and palette are fast peripheral bus slaves. the lcd and vga palettes have separate address spaces for reads and writes. however, there is also a combined address space for palette writes. writing to this area causes both the lcd and the vga palettes to be updated with the same data. when this option is used, 4 bits of each lcd color gun value are thrown away, so that the 8 bits per gun of the vga palette data can be used to program the lcd palette. thus the lcd gets the ms 4 bits of each vga gun data. the lcd palette write is organized such that it used the same format for writes from the cpu as the vga palette data, with it discarding the ls 4 bits of each gun data. 11.2.3 lcd datapath the lcd data path is similar to the vga data path, but it has a few additions. in tft mode, it is similar to vga, except that the digital rgb data is output directly to the pins of the chip, without going via a video dac. however, in stn mode, the data must be grayscaled, and then formatted for the lcd panel. the grayscaler block converts the 4 bit per color gun data into a single bit per gun, using a patented time/space dither algorithm. in mono mode, only the b gun data is used. the output of the grayscaler is fed to the formatter, which formats the pixels in the correct order for the lcd panel type
lcd & vga controllers 11-5 GMS30C7201 data sheet in use. (4 or 8 mono pixels per clock for mono panels, or 2 2 / 3 pixels per clock for color data.) the output of the formatter in color mode is bursty, due to the 2 2 / 3 pixels per clock that are output, so the formatter output goes to a small fifo, which smooths out this burstiness, before data is output to the lcd panel at a constant rate. 11.2.4 color/grayscale dithering entries selected from the look-up palette are sent to the color/grayscale space/ timebase dither generator. each 4-bit value is used to select one of 15 intensity levels. note that two of the 16 dither values are identical. the table below assumes that a pixel data input to the lcd panel is active high. that is, a ? 1 ? in the pixel data stream will turn the pixel on, and a ? 0 ? will turn it off. if this is not the case, the intensity order will be reversed, with ? 0000 ? being the most intense color. this polarity is lcd panel- dependent. the gray/color intensity is controlled by turning individual pixels on and off at varying periodic rates. more intense grays/colors are produced by making the average time that the pixel is off longer than the average time that it is on. the proprietary dither algorithm is optimized to provide a range of intensity values that match the eye ? s visual perception of color/gray gradations, with smaller changes in intensity nearer to the mid-gray level, and greater nearer the black and the white levels. in color mode, red, green and blue components are gray-scaled simultaneously as if they were mono pixels. the duty cycle and resultant intensity level for all 15 color/grayscale levels is summarized in table 11-1: color/grayscale intensities and modulation rates . dither value (4-bit value from palette) intensity (0% is white) modulation rate (ratio of on to on+off pixels) 0000 0.0% 0 0001 11.1% 1/9 0010 20.0% 1/5 0011 26.7% 4/15 0100 33.3% 3/9 0101 40.0% 2/5 0110 44.4% 4/9 0111 50.0% 1/2 1000 55.6% 5/9 1001 60.0% 3/5 1010 66.6% 6/9 1011 73.3% 11/15 1100 80.0% 4/5 1101 88.9% 8/9 1110 100.0% 1 1111 100.0% 1 table 11-1: color/grayscale intensities and modulation rates
lcd & vga controllers 11-6 GMS30C7201 data sheet 11.2.5 tft mode when tft display mode is enabled, the timing of the pixel, line and frame clocks as well as the ac-bias pin change. the pixel clock transitions continuously in this mode as long as the lcd is enabled. the ac-bias pin functions as an output enable. when it is high, the display latches data from the lcd ? s pins using the pixel clock. the line clock pin is used as the horizontal synchronization signal (hsync), and the frame clock is used as the vertical synchronization signal ( vsync ). pixel data is output one pixel per clock, rather than 4, 8 or 2 2 / 3 pixels per clock, as it is in the passive lcd modes. 11.2.6 sharing vga and lcd data generally when the lcd and the vga interface are running concurrently, both are operating entirely independently, and therefore two separate dma channels are running at the same time. this means that the memory bandwidth consumption is the sum of the bandwidth required for the two dma channels. clearly this is not very efficient if the lcd and the vga are displaying the same data. therefore, there is an option to share data between the vga and the lcd. the timings of the vga and the lcd must be synchronized. the lcd timing generator must be programmed so that the lcd slightly trails the vga in outputting pixel data. since there is a common dma data path to the vga and the lcd, the data is written into both fifos. the request is only generated when there is sufficient space in both fifos for the dma data. this means that the fifo levels of the two displays must be kept as close as possible. they cannot be kept exactly the same, because of the bursty nature of the lcd data, especially in color stn mode. however, by programming a small horizontal back porch offset from the lcd to the vga, they can be kept broadly similar. it is important that the free space in each of the fifos is kept as close as possible, because the request is only generated when there is enough space in both fifos, and if the fifo levels are significantly different, then fifo underflow could occur on one fifo, due to the other fifo not having reached the level at which its request is generated. when the images on the two screens are likely to be different at some stage in the future but are currently the same, the two dma channels can be operated independently. the vga and lcd enables ? on ? in the same control register, so they can be enabled simultaneously.
lcd & vga controllers 11-7 GMS30C7201 data sheet 11.3 video control register this register contains control bits for both the vga and the lcd controllers. the reason that both vga and lcd control bits are in the same register is to allow the simultaneous enabling of lcd and vga when sharing dma data. 11.3.1 lcd power control lcd displays require that the lcd is running before power is applied. for this reason, the lcd ? s power on control is not set to ? 1 ? unless both lcden and lcdpwr are set to ? 1 ? . note that most lcd displays require the lcden must be set to ? 1 ? approximately 20ms before lcdpwr is set to ? 1 ? for powering up. likewise, lcdpwr is set to ? 0 ? 20ms before lcden is set to ? 0 ? for powering down. bit name description 0 lcden lcd controller enable 0 - lcd controller disabled 1 - lcd controller enabled 2-1 lcdbpp lcd bits per pixel 00 - 4bpp 01 - 8bpp 10 - 16bpp 11 - reserved 3 lcdbw lcd monochrome 0 - color operation enabled 1 - monochrome operation only enabled 4 lcdtft lcd tft 0 - passive or stn display operation enabled 1 - active or tft display operation enabled 7-5 - reserved 8 vgaen vga controller enable 0 - vga controller disabled 1 - vga controller enabled 10-9 vgabpp vga bits per pixel 00 - 4bpp 01 - 8bpp 10 - 16bpp 11 - reserved 11 sharedma share dma data if this bit is set, the dma data streams for lcd and vga are shared. the request is only generated when there is space for data in both fifos (both fifo requests should be programmed to 8 words). the lcd timing generator should be slaved off the vga timing generator, with the clock source set as the vga clock. 12 bgr 0 - rgb normal video output for both lcd and vga 1 - bgr red and blue swapped for both lcd and vga 15-13 - reserved table 11-2: video control register videocontrol
lcd & vga controllers 11-8 GMS30C7201 data sheet 17-16 vgavcomp generate interrupt at: 00 - start of vsync 01 - start of back porch 10 - start of active video 11 - start of front porch 19-18 lcdvcomp generate interrupt at: 00 - start of vsync 01 - start of back porch 10 - start of active video 11 - start of front porch 20 vde video dac enable 0 - video dacs disabled (powered down) 1 - video dacs enabled 21 lcdmono8 lcd monochrome data width 0 - 4 bits lcd module 1 - 8 bits lcd module 22 lcdpwr lcd power enable 0 - lcd is off 1 - lcd is on when lcden =1 23 lcdble lcd backlight enable this drives ? 0 ? or ? 1 ? out to the lcd backlight enable pin. 31-24 - reserved bit name description table 11-2: video control register videocontrol (continued)
lcd & vga controllers 11-9 GMS30C7201 data sheet 11.4 lcd timing 0 register lcd timing 0 register (lcdtiming0) contains four bit-fields that are used to control horizontal lcd timing. see 11.6.2 pixel clock divider (pcd) on page 11-13 for a description of the terms ? pixelclock ? and ? lcdclk ? 11.4.1 pixels-per-line (ppl) the pixels-per-line (ppl) bit-field is used to specify the number of pixels in each line or row on the screen. ppl is a 6-bit value that represents between 16 ? 1024 pixels-per- line. ppl is used to count the correct number of pixel clocks that must occur before the line clock can be pulsed. program the value required divided by 16, minus 1. 11.4.2 horizontal sync pulse width (hsw) the 6-bit horizontal sync pulse width (hsw) field is used to specify the pulse width of the line clock in passive mode, or horizontal synchronization pulse in active mode. (program the value required minus 1.) 11.4.3 horizontal front porch (hfp) the 8-bit horizontal front porch (hfp) field is used to specify the number of pixel clock periods to insert at the end of each line or row of pixels before pulsing the line clock pin. once a complete line of pixels is transmitted to the lcd driver, the value in hfp is used to count the number of pixel clocks to wait before pulsing the line clock. hfp generates a wait period ranging from 1 ? 256 pixel clock cycles. (program to value required minus one.) 11.4.4 horizontal back porch (hbp) the 8-bit horizontal back porch (hbp) field is used to specify the number of pixel clock periods to insert at the beginning of each line or row of pixels. after the line clock for the previous line has been negated, the value in hbp is used to count the number of pixel clocks to wait before starting to output the first set of pixels in the next line. hbp generates a wait period ranging from 1 ? 256 pixel clock cycles (program to value required minus one.). bit name description 1-0 - reserved 7-2 ppl pixels-per-line number of pixels per line, divided by 16, minus 1 15-8 hsw horizontal sync pulse width number of lcdclk clock periods to pulse the line clock at the end of each line minus 1 23-16 hfp horizontal front porch number of lcdclk clock periods to add to the end of a line transmission before line clock is asserted, minus 1 31-24 hbp horizontal back porch number of lcdclk clock periods to add to the beginning of a line transmission before the first set of pixels is output to the display minus 1 table 11-3: lcd timing register 0
lcd & vga controllers 11-10 GMS30C7201 data sheet 11.4.5 vga timing 0 register the vga timing 0 register has the same format as the lcd timing 0 register.
lcd & vga controllers 11-11 GMS30C7201 data sheet 11.5 lcd timing 1 register lcd timing 1 register (lcdtiming1) contains four bit-fields that are used to control lcd vertical timing parameters. 11.5.1 lines per screen (lps) the lines per screen (lps) bit-field is used to specify the number of lines or rows per lcd panel being controlled. lps is a 10-bit value which represents between 1 ? 1024 lines per screen. the register is programmed with the number of lines per screen minus 1. 11.5.2 vertical sync pulse width (vsw) the 6-bit vertical sync pulse width (vsw) field is used to specify the pulse width of the vertical synchronization pulse in active mode, or is used to add extra dummy line clock delays between frames in passive mode. the register is programmed with the number of lines of vsync minus one. 11.5.3 vertical front porch (vfp) the 8-bit vertical front porch (vfp) field is used to specify the number of line clocks to insert at the end of each frame. once a complete frame of pixels is transmitted to the lcd display, the value in vfp is used to count the number of line clock periods to wait. after the count has elapsed the vsync ( lcdfp ) signal is pulsed in active mode, or extra line clocks are inserted as specified by the vsw bit-field in passive mode. vfp generates from 0 ? 255 line clock cycles.this should be zero for passive display modes, unless synchronizing to the vga to share data. 11.5.4 vertical back porch (vbp) the 8-bit vertical back porch (vbp) field is used to specify the number of line clocks to insert at the beginning of each frame. the vbp count starts just after the vsync signal for the previous frame has been negated for active mode, or the extra line clocks have been inserted as specified by the vsw bit-field in passive mode. after this has occurred, the value in vbp is used to count the number of line clock periods to insert before starting to output pixels in the next frame. vbp generates from 0 ? 255 extra line clock cycles. this should be programmed to zero in passive mode, unless sensing lcd to vga to share dma data. bit name description 9-0 lps lines per screen number of lines per screen. program to number of lines required minus 1. 15-10 vsw vertical sync pulse width number of vsync lines. should be small for passive lcd, but should be long enough to re-program the video palette under interrupt control, without writing the video palette at the same time as video is being displayed. program to the number of lines required minus one. 23-16 vfp vertical front porch number of inactive lines at the end of frame, before vsync period. program to zero on passive displays.
lcd & vga controllers 11-12 GMS30C7201 data sheet 11.5.5 vga timing 1 register the vga timing 1 register has the same format as the lcd timing 1 register, except that the vertical front porch and vertical back porch should be programmed to the number of lines minus one. 31-24 vbp vertical back porch number of inactive lines at the start of a frame, after vsync period. program to zero on passive displays. bit name description
lcd & vga controllers 11-13 GMS30C7201 data sheet 11.6 lcd timing 2 register lcd timing 2 register (lcdtiming2) contains seven different bit-fields that are used to control various functions associated with the timing of the lcd controller. 11.6.1 pixel clock source (pcs) this bit controls the source of the pixel clock. it can either be the video bus clock, or it can be the vga clock. selecting the video bus clock means that the vga clock can be used for the 48mhz clock for fastir when using only the lcd. selecting the vga clock means that the lcd and the vga can be operated from the same clock when sharing data. 11.6.2 pixel clock divider (pcd) the 5-bit pixel clock divider (pcd) field is used to select the frequency of the lcdcp clock signal to the lcd panel. pcd can generate a range of lcdcp clock frequencies from lcdclk/2 to lcdclk/33, where lcdclk is the clock selected by lcs. the frequency of the pixel clock for a set pcd value can be calculated using the following equation: note that in the case of the lcd, the pixel clock is not the frequency of some nominal clock rate that individual pixels are output to the lcd. it is the frequency of the lcdcp signal. in normal mono mode (4-bit interface), four pixels are output per lcdcp cycle, so the pixelclock is one quarter the nominal pixel rate. in the case of 8-bit interface mono, pixelclock is one eighth the nominal pixel rate, since 8 pixels are output per lcdcp cycle. in the case of color, pixelclock is 0.375 times the nominal pixel rate, because 2 2 / 3 pixels are output per lcdcp cycle. if the lcd and vga are operating concurrently, and sharing dma data, then in color mode the pixel clock should normally be 3 / 8 the vga clock. to achieve this, pcd should be programmed to the value 0 and the skip4 bit set to ? 1 ? . the skip4 bit produces a null clock cycle (no high phase) every fourth clock cycle. 11.6.3 ac-bias pin frequency (acb) the 5-bit ac-bias frequency (acb) field is used to specify the number of line clock periods to count between each toggle of the ac-bias pin (lcdac). the value programmed is the number of lines between transitions, minus 1. note the acb bit field had no effect on lcdac in active mode. the pixel clock transitions continuously in active mode and the ac bias line is used as an output enable signal. 11.6.4 invert vsync (ivs) the invert vsync (ivs) bit is used to invert the polarity of the lcdfp signal. when ivs=1, lcdfp is active low. when ivs=0, lcdfp is active high. 
   + () --------------------------- - =
lcd & vga controllers 11-14 GMS30C7201 data sheet 11.6.5 invert hsync (ihs) the invert hsync (ihs) bit is used to invert the polarity of the lcdlp signal. when ihs=1, lcdlp is active low. when ihs=0, lcdlp is active high. 11.6.6 invert pixel clock (ipc) the invert pixel clock (ipc) bit is used to select which edge of the pixel clock pixel data is driven out onto the lcd ? s data lines. when ipc=0, data is driven onto the lcd ? s data lines on the rising-edge of lcdcp . when ipc=1, data is driven onto the lcd ? s data lines on the falling-edge of lcdcp . 11.6.7 invert output enable (ieo) the invert output enable (ieo) bit is used to select the active and inactive state of the output enable signal in active display mode. in this mode, the ac-bias pin is used as an enable that signals the off-chip device when data is actively being driven out using the pixel clock. when ieo=0, the lcdac pin is active high. when ieo=1, the lcdac pin is active low. in active display mode, data is driven onto the lcd ? s data lines on the programmed edge of lcdcp when lcdac is in its active state. bit name description 4-0 pcd pixel clock divisor used to specify the frequency of the pixel clock based on the lcd clock (lcdclk) frequency. pixel clock frequency can range from lcdclk/2 to lcdclk/33. pixel clock frequency = lcdclk/(pcd+2). 5 pcs pixel clock source 0 - video dma bus clock 1 - vga clock 10-6 acb ac bias pin frequency number of line clocks to count before toggling the ac bias pin. this pin is used to periodically invert the polarity of the power supply to prevent dc charge build-up within the display. program to value required minus 1. 11 ivs invert vsync 0 - lcdfp pin is active high and inactive low. 1 - lcdfp pin is active low and inactive high. 12 ihs invert hsync 0 - lcdlp pin is active high and inactive low. 1 - lcdlp pin is active low and inactive high. 13 ipc invert pixel clock 0 - data is driven on the lcd ? s data lines on the rising-edge of lcdcp . 1 - data is driven on the lcd ? s data lines on the falling-edge of lcdcp . 14 ieo invert output enable 0 - lcdac pin is active high in tft mode 1 - lcdac pin is active low in tft mode. 15 slv slave mode slave (or genlock) lcd to vga video. the hsync and vsync are locked to the vga timing generator. the lcd horizontal timing must be carefully programmed if sharing dma data table 11-5: lcd controller bit fields
lcd & vga controllers 11-15 GMS30C7201 data sheet 11.6.8 clocks per line (cpl) this is the actual number of clocks output to the lcd panel each line, minus one. this must be programmed, in addition to the ppl field in the lcd timing 0 register. the number of clocks per line is the number of pixels per line divided by either one, four, eight or two-and-two-thirds for tft mode, mono 4-bit mode, mono 8-bit, or color stn mode respectively. 11.6.9 bypass pixel clock divider setting this bit allows an undivided lcd clock to be output on lcd. this bit should only be set for tft mode. 11.6.10skip every fourth clock pulse (skip 4) set this bit to ? 1 ? when running a color passive lcd with simultaneous vga display in shared dma, slave mode. this produces an irregular clock to the lcd, where every fourth clock pulse is suppressed (the clock stays low for one clock period). this is necessary because two-and-two-third pixels per clock, which are sent to the lcd, is not an integer multiple. this means that three clocks will be output every four clock periods. if pcd is zero, then eight pixels will be output every eight lcdclk periods, since the lcd cp clock will be half the frequency of lcdclk . 25-16 cpl clocks per line this field specifies the number of actual clocks to the lcd panel on each line. this the number of pixels per line divided by either 1 (tft), 4 or 8 (for mono passive), 2 2 / 3 (for color passive), minus one. 26 bcd bypass pixel clock divider 27 skip4 skip every fourth clock high period to allow color passive lcd to run with shared vga dma. 31-28 - reserved bit name description table 11-5: lcd controller bit fields (continued)
lcd & vga controllers 11-16 GMS30C7201 data sheet 11.7 vga timing 2 register vga timing 2 register (vgatiming2) controls various functions associated with the timing and control of the vga controller. 11.7.1 invert vsync (ivs) the invert vsync (ivs) bit is used to invert the polarity of the vsync signal. when ivs=1, vsync is active high. when ivs=0, vsync is active low. 11.7.2 invert hsync (ihs) the invert hsync (ihs) bit is used to invert the polarity of the hsync signal. when ivs=1, hsync is active high. when ivs=0, hsync is active low. 11.7.3 composite vsync (cvs) when this bit is set, the vsync signal outputs a composite sync comprised of hsync xnor vsync . if the ivs bit is set, it will invert this to produce the xor of the syncs. 11.7.4 composite hsync (chs) when this bit is set, the hsync pin outputs the logical and of vsync and hsync . if ihs is set it will output the nand of the syncs. bit name description 0-10 - reserved 11 ivs invert vsync 0 - vsync is a negative edge sync. 1 - vsync is a positive edge sync. 12 ihs invert hsync 0 - hsync is a negative edge sync. 1 - hsync is a positive edge sync. 13 cvs composite vsync output xnor of hsync and vsync on vsync pin (xor if ivs is set) 14 chs composite hsync output and of hsync and vsync on hsync pin (nand if ihs is set) 31-15 - reserved table 11-6: vga timing 2 register functions
lcd & vga controllers 11-17 GMS30C7201 data sheet 11.8 vga timing 3 register the vga timing 3 register is used to program the timing of the vga border display. it consists of 4 8-bit fields which specify the number of pixel clocks or line clocks after the start of the porch periods that the border starts or stops. the border periods run ? concurrently ? with porch periods, so that the porch timings for lcd and vga are the same. (there is no border on lcd). therefore, if programming lcd and vga with the same timings, then the border values would be the same. 11.8.1 vga horizontal border start register this register contains the number of pixel clocks after the start of the horizontal back porch period, that the border display starts, minus one. 11.8.2 vga horizontal border end register this register contains the number of pixel clocks after the end of horizontal data ends that the border color will be displayed for, minus one. 11.8.3 vertical border start register this register contains the number of lines after the vertical back porch begins that the border display starts, minus one. 11.8.4 vertical border end register this register contains the number of lines after the vertical front porch begins that the border will be displayed for. 11.8.5 vga border color register bit name description 7-0 hbs horizontal border start 15-8 hbe horizontal border end 23-16 vbs vertical border start 31-24 vbe vertical border end table 11-7: horizontal and vertical border registers bit name description 23-0 bcol rgb 8:8:8 border colour table 11-8: vga border colour register
lcd & vga controllers 11-18 GMS30C7201 data sheet 11.9 lcd dma base address register the lcd dma base address register (lcddbar) is a read/write register used to specify the base address of the off-chip frame buffer for the lcd. addresses programmed in the base address register must be aligned on sixteen-word boundaries, thus the least significant six bits (lcddbar[5:0]) must always be written with zeros. only 26 bits of the register are valid (including the ls 6bits which must be zero), because lcd dma is only allowed from sdram. the 26 bit address range allows the lcd dma to access any address within the sdram. the upper address lines are not needed, because these are the address lines used to select which device is accessed, but the lcd always accesses sdram. the user must initialize the base address register before enabling the lcd, and may also write a new value to it while the lcd is enabled to allow a new frame buffer to be used for the next frame. the user can change the state of lcddbar while the lcd controller is active, after the next frame (next) status bit is set within the lcd ? s status register that generates an interrupt request. this status bit indicates that the value in the base address pointer has been transferred to the current address pointer register and that it is safe to write a new base address value. this allows double-buffered video to be implemented if required. 11.9.1 vga dma base address register the vga dma base address register is the same as the lcd base address register, but for the vga display. bit name description 5-0 - reserved should always be written zero 25-6 lcddbar lcd dma channel base address pointer 16-word aligned base address in sdram of the frame buffer within off-chip memory. 31-26 - reserved should be written zero table 11-9: lcd dma base address registers
lcd & vga controllers 11-19 GMS30C7201 data sheet 11.10lcd dma channel current address register this read-only register allows the processor to read the current value of the lcd dma channel current address register. this is not something that would normally be done, but it allows additional test observability. its value cannot be expected to be exact, it could change at an moment. however, its contents can be read to determine the approximate line that the lcd controller is currently displaying and driving out to the display 11.10.1vga dma channel current address register the vga dma base address register is the same as the lcd base address register, but for the vga display. bit name description 5-0 - undefined 25-6 lcddcar lcd dma channel current address pointer 16-word aligned current address pointer to data in sdram frame buffer currently being displayed. 31-26 - undefined table 11-10: lcd dma channel current address register
lcd & vga controllers 11-20 GMS30C7201 data sheet 11.11lcd controller status/mask and interrupt registers the lcd controller status, mask and interrupt registers all have the same format. each bit of the status register is a status bit that may generate an interrupt. these are masked by the corresponding bits in the mask register. the interrupt register is the logical and of the status and mask registers, and the interrupt output from the lcd controller is the logical or of the bits within the interrupt register. the lcd controller status register (lcsr) contains bits that signal an under-run error for the fifo, the dma next base update ready status, and the dma done status. each of these hardware-detected events can generate an interrupt request to the interrupt controller. 11.11.1lcd frame done (ldone) the lcd frame done (done) is a read-only status bit that is set after the lcd has been disabled and the frame that is active finishes being output to the lcd ? s data pins. it is cleared by writing the base address ( lcddbar ) or enabling the lcd, or, by writing ? 1 ? to the ldone bit of the status register. when the lcd is disabled by clearing the lcd enable bit ( lcden =0) in lcdcontrol, the lcd allows the current frame to complete before it is disabled. after the last set of pixels is clocked out onto the lcd ? s data pins by the pixel clock, the lcd is disabled and done is set. 11.11.2lcd next frame (lnext) the lcd next frame (lnext) is a read-only status bit that is set after the contents of the lcd dma base address register are transferred to the lcd dma current address register, and it is cleared when the lcd dma base address register is written. 11.11.3fifo underflow status (lfuf) the lcd fifo underflow status (lfuf) status bit is set when the lcd fifo under- runs. the status bit is ? sticky ? , meaning it remains set after the fifo is no longer under- running. the status bit is cleared by writing a ? 1 ? to this bit of the status register. 11.11.4vcomp interrupt this bit is set when the lcd timing generator reaches the vertical region programmed in the video control register. this bit is ? sticky ? , meaning it remains set until it is cleared by writing a ? 1 ? to this bit of the status register. bit name description 0 lfuf fifo underflow status/mask/interrupt bit 1 lnext lcd next base address update status/mask/interrupt bit this status bit is set when the base address is transferred to the current address register at the start of frame 2 vcomp vertical compare interrupt 3 ldone lcd done frame status/mask/interrupt bit this status bit is set when lcden has been set to ? 0 ? , after the current frame completes table 11-11: lcd controller status/mask and interrupt registers
lcd & vga controllers 11-21 GMS30C7201 data sheet 11.11.5vga status/mask/interrupt registers the vga status, mask and interrupt registers are exactly the same format as the lcd registers. the only difference is that if the vga is disabled, it is disabled immediately, rather than waiting for the end of frame. this means there is no equivalent of ldone for the vga
lcd & vga controllers 11-22 GMS30C7201 data sheet 11.12lcd palette registers the lcd palette registers are a set of 256 word-aligned registers that allow the lcd to be programmed. the format of the palette data is shown below. the format of the data is chosen such that it is compatible with the format of the vga palette data. in addition to the lcd palette write address area, there is also an area where the lcd and vga palettes may be written simultaneously. 11.12.1vga palette registers the vga palette registers provide the same functionality as the lcd palette registers, but for the vga. the vga palette register entries have 24 valid bits, because there are 8 bits per color gun, rather than four for the lcd. there is a read/write area for vga registers only, and a write-only area to write both the vga and lcd palettes simultaneously. bit name description 3:0 - reserved 7:4 r red palette data 11:8 - reserved 15:12 g green palette data 19:16 - reserved 23:20 b blue palette data 31:24 - reserved table 11-12: lcd palette registers bit name description 7:0 r red palette data 15:8 g green palette data 23:16 b blue palette data 31:24 - reserved table 11-13: vga palette registers
lcd & vga controllers 11-23 GMS30C7201 data sheet 11.13vga test register the vga test register contains bits that allow certain vga signals to be output on the lcd pins for test purposes. this register should not normally be used. the register is reset to all zero, and this will result in normal operation. bit name description 0 - reserved 2-1 thdo test vga data output 00 - lcd data bus outputs normal lcd data 01 - undefined 10 - lcd data bus outputs low nibble of vga rgb data 11 - lcd data bus outputs high nibble of vga rgb data 3 tvdata walking one ? s pattern used in place of sdram data for the vga controller 4 tldata walking one ? s pattern used in place of sdram data for the lcd controller 5 tdac 0 - normal vga dac operation 1- test vga dac operation: dac clock and power down from pins, dac data input from lcd data bus pins 6 trf for production test of grayscaler, never write a ? 1 ? to these registers in normal use. 7 tcf for production test of grayscaler, never write a ? 1 ? to these registers in normal use. 8 tlr for production test of grayscaler, never write a ? 1 ? to these registers in normal use. 9 tcr for production test of grayscaler, never write a ? 1 ? to these registers in normal use. 10 tlc for production test of grayscaler, never write a ? 1 ? to these registers in normal use. 11 tcc for production test of grayscaler, never write a ? 1 ? to these registers in normal use. 31-12 - reserved table 11-14: vga test register
lcd & vga controllers 11-24 GMS30C7201 data sheet 11.14grayscaler test registers the registers gsframe state, gsrow state and gs column state are used for the purpose of production test and must not be written to or read from in normal use.
lcd & vga controllers 11-25 GMS30C7201 data sheet 11.15video controller register locations the videocontrol register appears in two positions in the register map. it appears in the lcd area and also in the vga area. this register allows both controllers to be enabled simultaneously. the lcd and vga palette registers can also be read and written in their own unique address space, or written only in a combined area. table 11-15: lcd register map locations shows the registers associated with the lcd controller and the physical addresses used to access them. name type description videobase+ 0x00 videocontrol video control register videobase+ 0x04 lcdstatus lcd status register videobase + 0x08 lcdstatusmask lcd status mask register videobase + 0x0c lcdinterrupt lcd interrupt register videobase+ 0x10 lcddbar lcd dma channel base address register videobase + 0x14 lcddcar lcd dma channel current address register videobase + 0x20 lcdtiming0 lcd timing 0 register videobase + 0x24 lcdtiming1 lcd timing 1 register videobase + 0x28 lcdtiming2 lcd timing 2 register videobase+ 0x44 vgastatus vga status register videobase + 0x48 vgastatusmask vga status mask register videobase + 0x4c vgainterrupt vga interrupt register videobase+ 0x50 vgadbar vga dma channel base address register videobase + 0x54 vgadcar vga dma channel current address register videobase + 0x60 vgatiming0 vga timing 0 register videobase + 0x64 vgatiming1 vga timing 1 register videobase + 0x68 vgatiming2 vga timing 2 register videobase + 0x6c vgatiming3 vga timing 3 register (border timing) videobase + 0x70 vgaborder vga border color register videobase +0x80 vgatest vga test register videobase +0x84 gsframestate grayscaler production test register videobase +0x88 gsrowstate grayscaler production test register videobase +0x8c gscolumnstate grayscaler production test register videobase + 0x400 - videobase + 0x7fc lcdpalette lcd palette programming registers table 11-15: lcd register map locations
lcd & vga controllers 11-26 GMS30C7201 data sheet videobase + 0x800 - videobase + 0xbfc vgapalette vga palette programming registers videobase + 0xc00 - videobase + 0xffc lcdvgapalette combined lcd and vga palette write-only registers name type description table 11-15: lcd register map locations
lcd & vga controllers 11-27 GMS30C7201 data sheet figure 11-2: example mono stn lcd panel signal waveforms. table 11-16: example tft signal waveforms, start of frame. table 11-17: example tft signal waveforms, end of last line. ld[11:0] lcp (cl2) llp (cl1) lfp (flm) lac (bias) (only high for first display line) ld[11:0] lcp llp (cl1) lfp (vsync) lac (dispen) ld[11:0] lcp llp (cl1) lfp (vsync) lac (dispen)
lcd & vga controllers 11-28 GMS30C7201 data sheet
12-1 GMS30C7201 data sheet 12.1 introduction 12-2 12.2 peripheral dma controller 12-3 12.3 medium and fast infrared module 12-17 12.4 general configuration 12-26 12.5 transmitting data 12-27 12.6 receiving data 12-29 12.7 special conditions 12-31 12.8 medium speed infra-red port (mir) 12-32 12.9 fast infrared port (fir) 12-41 12.10 universal serial bus 12-53 12.11 sound interface 12-68 fast amba peripherals 12
fast amba peripherals 12-2 GMS30C7201 data sheet 12.1 introduction this chapter describes the peripherals that are connected to the 30mhz internal peripheral bus. the lcd and vga control registers are connected to this bus. a summary of lcd and vga features appears in 11.1 overview on page 11-2. these peripherals are supported by the dma controller, which transfers data to/from sdram. further details are available in chapter 3, architecture overview .
fast amba peripherals 12-3 GMS30C7201 data sheet 12.2 peripheral dma controller the 7201 has an on-chip dma controller (dmac) that can transfer data on up to three channels. the following sections describe the direct memory access unit (dmac). overview register descriptions dmac operation examples of use 12.2.1 overview this chip includes a three-channel direct memory access controller (dmac). the dmac can be used in place of the cpu to perform high-speed transfers between peripheral devices and memory space. note the dma controller can only transfer data to and from sdram. transfers to addresses other than sdram will produce unpredictable results. features the dmac has the following features.  three channels  4 gbytes of address space on the architecture  max transfer rate: 910mb/s  max transfer number: 16384  address mode: single address is supported.  channel function: transfer mode is different in each channel. channel 0 this channel has a source address reload function, which is used by sound interface controller. the memory space of sound i/o device consists of double buffer. the sound interface uses exception bus mode and word access. exception bus mode: when the request is active, dmac serves only one time operation. channel 1 this channel is used by the infrared communication port(icp). the channel uses exception bus mode and word access. channel 2 this channel is used by the universal serial bus(usb). the channel uses burst bus mode and word access.  channel priority level : selectable fixed mode  interrupt request : an interrupt request can be generated to the cpu after transfers end by the specified counts.
fast amba peripherals 12-4 GMS30C7201 data sheet 12.2.2 block diagram figure 12-1: dmac block diagram 12.2.3 signal description the dmac module is connected to the asb. dma operation register block channel control register register select internal bus transendint dmareq[2:0] chan[1:0] address count (sound i/o) address count (icp i/o) address count (usb i/o) transfer count (sound i/o) transfer count (icp i/o) transfer count (usb i/o) bus if asb bus name type source/ destination description bclk in clock controller system (bus) clock. this clock times all bus transfers. the clock has two distinct phases - phase 1 in which bclk is low, and phase 2 in which bclk is high. bnres in reset controller these signals indicate the reset status of the bus table 12-1: asb signal description
fast amba peripherals 12-5 GMS30C7201 data sheet ba[31:0] inout asb bus asb address. output for dmac operation.input for register access. bd[31:0] inout asb bus this is part of the bidirectional system data bus. areq out arbiter request signal for asb bus mastership. agnt in arbiter bus grant signal from asb arbiter. granted out apb this signal informs apb of the granted bus state. berror inout asb bus asb error signal. blast inout asb bus asb break burst signal from slave (sdram controller). block out asb bus asb locked transfer signal bprot[1:0] out asb bus asb master protection information. bsize[1:0] out asb bus asb transaction size signal btran[1:0] out asb bus asb transaction type signal. bwait inout asb bus asb wait transfer signal. input for dma cycle stretch. out for register access. bwrite inout asb bus asb transfer direction signal dsel in decoder register select signal ndmreq[2:0] in i/o device dma transfer request signal from the i/o device chan[1:0] out apb dma channel select signal to apb transendint out cpu dma transfer end interrupt signal to cpu dmatest out arbiter this signal informs dma test mode during tic test. name type source/ destination description table 12-1: asb signal description (continued)
fast amba peripherals 12-6 GMS30C7201 data sheet 12.2.4register configuration table 12-2: dmac register summary summarizes the dmac registers . the address register, transfer number register and channel control register of dma channel 0. address name description dmacbase + 0x00 ch0_start_address_buffer0 # 32-bit r/w dmacbase + 0x04 ch0_start_address_buffer1 # 32-bit r/w dmacbase + 0x08 ch0_transfer_num_buffer0 # 32-bit r/w dmacbase + 0x0c ch0_transfer_num_buffer1 # 32-bit r/w dmacbase + 0x10 ch0_control # 32-bit r/w dmacbase + 0x14 ch1_start_address # 32-bit r/w dmacbase + 0x18 ch1_transfer_number # 32-bit r/w dmacbase + 0x1c ch1_control # 32-bit r/w dmacbase + 0x20 ch2_start_address # 32-bit r/w dmacbase + 0x24 ch2_transfer_number # 32-bit r/w dmacbase + 0x28 ch2_control # 32-bit r/w dmacbase + 0x2c interrupt_flag # 32-bit r/o dmacbase + 0x30 test_register0 # 32-bit r/w dmacbase + 0x34 test_register1 # 32-bit r/o dmacbase + 0x38 test_register2 # 32-bit r/o dmacbase + 0x3c dma_operation # 32-bit r/w table 12-2: dmac register summary address r/w name bit initialized to contents dma base + 0x00 r/w adr0 [31 ? 0] 0x0 dmac 0 source address (buffer 0 address) this channel transfers data from external memory to the sound interface block table 12-3: dmac0 registers
fast amba peripherals 12-7 GMS30C7201 data sheet dma base + 0x04 r/w asr [31:0] 0x00...00 dmac 0 sound address (buffer 1 address) this channel transfers data from external memory to sound interface block.this value will be automatically reloaded. dma base + 0x08 r/w r tnr0 [13:0] [31:14] 0x3fff 0x00000 dmac0 transfer number (maxmium transfer number of buffer0 is 0x4000 word) reserved bits dma base + 0x0c r/w r tsr [13:0] [31:14] 0x3fff 0x00000 dmac0 sound transfer number (maximum transfer number of buffer1 is 0x4000 word) this value will be automatically reloaded. reserved bits dma base + 0x10 r/w r ccr0 [0] [1] [2] [31:3] 0 0 0 0x00 dmen (dmac0 enable bit) mask0(buffer 0 transfer end interrupt mask bit) mask1(buffer 1 transfer end interrupt mask bit) reserved bits address r/w name bit initialized to contents table 12-3: dmac0 registers (continued)
fast amba peripherals 12-8 GMS30C7201 data sheet 12.2.5 dmac1 registers this section gives the address register and channel control registers of dma channel 1. 12.2.6 dmac 2 registers address r/w name bit initialized to contents dma base + 0x14 r/w adr1 [31:0] 0x00...00 this value is start address of icp rx buffer. dma base + 0x18 r/w tnr1 [13:0] [31:14] 3fff 0x00000 maximum transfer number of dmac1 is 0x4000 word reserved bits dma base + 0x1c r/w ccr1 [0] [1] [2] [31:3] 0 0 0 0x0000 dmen1 (dmac1 enable bit) modsel when low, transfer from memory to i/o. when high, transfer from i/o to memory. reserved bits mask (the mask bit of transfer end interrupt for icp) table 12-4: dmac1 registers address r/w name bit initialized to contents dma base + 0x20 r/w adr2 [31:0] 00x00 this value is the start address of dma channel for usb controller dma base + 0x24 r/w tnr2 [13:0] [31:14] 3fff 0x0000 maximum transfer number of dmac2 is 0x4000 word reserved bits dma base + 0x28 r/w ccr2 [0] [1] [2] [31:3] 0 0 0 0x0000 dmen modsel when low, transfer from memory to i/o. when high, transfer from i/o to memory. mask reserved bits table 12-5: dmac2 registers
fast amba peripherals 12-9 GMS30C7201 data sheet 12.2.7 interrupt flag registers the interrupt flag registers of dmac 12.2.8 test register 0 of dmac address r/w name bit initialized to contents dma base + 0x2c r/w r flagr [0] [1] [2] [3] [31:4] 0 0 0 0 0x000000 flag0 (buffer 0 transfer end flag bit for channel 0) cleared by writing 1. flag1 (buffer 1 transfer end flag bit for channel 0) cleared by writing 1. flag2 (transfer end flag bit for channel 1) cleared by writing 1. flag3 (transfer end flag bit for channel 2) cleared by writing 1. reserved bits table 12-6: flag register address r/w name bit initialized to contents dma base + 0x30 r/w r testr0 [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [31:11] 0 0 0 0 0 0 0 0 0 0 0 0x000000 test internal mode test external mode test request of channel 0 test request of channel 1 test request of channel 2 carryin bit for testing the address counter of channel 0 carryin bit for testing the address counter of channel 1 carryin bit for testing the address counter of channel 2 carryin bit for testing the transfer counter of channel 0 carryin bit for testing the transfer counter of channel 1 carryin bit for testing the transfer counter of channel 2 reserved bit table 12-7: test register 0
fast amba peripherals 12-10 GMS30C7201 data sheet 12.2.9 dmac (read only) test register1 12.2.10dmac (read only) test register2 12.2.11dmac operation register address r/w name bit initialized to contents dma base + 0x34 r/w testr1 [31:0] 0 when in test mode, this register latches the address of dmac. table 12-8: dmac test register 1 address r/w name bit initialized to contents dma base + 0x38 r/w r testr2 [0] [1] [3:2] [5:4] [6] [8:7] [31:9] 0 0 0 0 0 0 0x000000 bwrite dmac request signal bsize[1:0} btran[1:0] transendint (the transfer-end interrupt of dmac) chsel[1:0] reserved bits table 12-9: test register 2 address r/w name bit initialized to contents dma base + 0x3c r/w r dmaor [0] [1] [2] [31:3] 0 0 0 0x0000 dmaen (dmac master enable bit) prmd0 (priority mode bit 0) prmd1 (priority mode bit 1) reserved bits table 12-10: test register 2
fast amba peripherals 12-11 GMS30C7201 data sheet 12.2.12register descriptions dma address registers (adr0 ? 2, asr) dma address registers are 32 bits read/write registers that specify the address of a dma transfer. initial value is 0x00000000. dma transfer number register (tnr0 ? 2, tsr) dma transfer number registers are 32 bits read/write registers that specify the dma transfer number. initial value is 0x3fff. dma channel control register (ccr0 ? 2) dma channel control registers are 32 bits read/write register that specifies operation mode in each channel.
fast amba peripherals 12-12 GMS30C7201 data sheet channel control register 0(ccr0) this register is channel control register of the interface controller for sound peripheral device. bit 0 (dmen: enables channel operation) bit 1 (mask0: the mask bit of transfer end interrupt for buffer 0) bit 2 (mask1: the mask bit of transfer end interrupt for buffer 1) channel control register 1(ccr1) this register is channel control register of infrared communication port(icp) controller. bit 0 (dmen: enables channel 1 operation) dmen description 0 disables channel operation (initial value) 1 enables channel operation table 12-11: bit 0 mask0 description 0 interrupt request is not generated even if data transfer ends by the specified count (initial value) 1 interrupt request is generated if data transfer ends by the specified count table 12-12: bit 1 mask 1 description 0 interrupt request is not generated even if data transfer ends by the specified count (initial value) 1 interrupt request is generated if data transfer ends by the specified count table 12-13: bit 2 mask 1 dmen description 0 disables channel 1 operation (initial value) 1 enables channel 1 operation table 12-14: bit 0
fast amba peripherals 12-13 GMS30C7201 data sheet bit 1 (modsel: mode select bit) bit 2 (mask: the mask bit of transfer end interrupt for receive buffer) channel control register 2(ccr2) this register is the channel control register of the universal serial bus interface controller. bit 0 (dmen: enables channel 2 operation) bit 1 (modsel: mode select bit) bit 2 (mask: the mask bit of transfer end interrupt for receive buffer) modsel description 0 dmac transfers data from memory to i/o buffer 1 dmac transfers data from i/o buffer to memory table 12-15: bit 1 mask description 0 interrupt request is not generated even if data transfer ends by the specified count (initial value) 1 interrupt request is generated if data transfer ends by the specified count table 12-16: bit 2 dmen description 0 disables channel 2 operation (initial value) 1 enables channel 2 operation table 12-17: bit 0 modsel description 0 dmac transfers data from memory to i/o buffer 1 dmac transfers data from i/o buffer to memory table 12-18: bit 1 mask description 0 interrupt request is not generated even if data transfer ends by the specified count (initial value) 1 interrupt request is generated if data transfer ends by the specified count table 12-19: bit 2
fast amba peripherals 12-14 GMS30C7201 data sheet dma test register the dma test register is a 32 bits read/write register that tests the dma master. initial value: 0x00. dma operation register (dmaor) the dma operation register is a 32 bits read/write register that controls the dma master. bit 0 (dmaen: enables or disables dma transfers on all channels). bit1 (prmd0 ? 1): select the priority level between channels when there are transfer requests for multiple channels simultaneously. 12.2.13dmac operation when there is a dma transfer request, the dmac starts the transfer according to the predetermined channel priority order. if the transfer end conditions are satisfied, it ends the transfer. 12.2.14dma transfer flow after the dma address register (adr, asr), dma transfer number register (tnr), dma channel control register (ccr), and dma operation register (dmaor) are set, the dmac transfers data according to the following procedure.  see if the dmen bit of ccr and the dmaen of dmaor are enabled.  when a transfer request comes and transfer condition is enabled, the dmac transfers data according to bus size, address mode and bus mode.  when the specified number of transfer have been competed (tnr = count value), the transfer ends normally. if the mask bit of the ccr is set to 1 at this time, the dma transfer end interrupt is sent to the cpu. dmaen description 0 disable dma transfer on all channels (initial value) 1 enable dma transfer on all channels table 12-20: dma operation register (dmaor) prmd1 prmd0 description 0 0 ch1 > ch2 > ch0 (initial value) 0 1 ch1 > ch0 > ch2 1 0 ch2 > ch1 > ch0 1 1 ch0 > ch1 > ch2 table 12-21: bit 1 (prmd0-1)
fast amba peripherals 12-15 GMS30C7201 data sheet dma channel priority when the dmac receives simultaneous transfer requests, it selects a channel according or a predetermined priority order. the priority order is selected by the priority order select bits, prmd0 and prmd1, in the dma operation register. dma bus mode burst mode once the bus mastership is obtained, the transfer is performed continuously until the transfer end condition is satisfied. however, when the ndmreq pin is driven high, the bus passes to the other bus master after current cycle ends. dma request is ndmreq level detection. ndmreq cpu cpu dma dma dma dma cpu exception mode in the exception mode, the bus mastership is given to another bus master after a one- transfer-unit dma transfer. the dma request should be disabled by i/o device module. dma request is ndmreq level detection. ndmreq cpu dma cpu cpu dma cpu cpu
fast amba peripherals 12-16 GMS30C7201 data sheet 12.2.15examples of use dma transfer between sound i/o device and memory. in the following example, data is transferred from memory to sound i/o device. the transfer is performed by dmac channel 0. dma transfer between the transmit buffer of icp and memory the transfer is performed by dmac channel 2. transfer conditions register setting value transfer source: memory adr0 or asr memory address value the number of transfer:10 tnr0 0x000a source address: increment interrupt enable ccr0 0x07 bus mode: exception transfer size: word channel priority order: ch 1> ch 2 > ch 0 dmaor 0x01 table 12-22: dma transfer between sound i/o device and memory transfer conditions register setting value transfer destination: memory adr2 memory address value the number of transfer:10 tnr0 0x000a hssp mode and enables interrupt ccr0 0x016 bus mode: burst transfer size: word channel priority order: ch 2 > ch 1 >ch 0 dmaor 0x05 table 12-23: dma transfer between the transmit buffer of icp and memory
fast amba peripherals 12-17 GMS30C7201 data sheet 12.3 medium and fast infrared module 12.3.1 overview the arm 7201 infrared interface module implements in hardware the physical layer of an infrared serial port, compliant with version 1.1 of the infrared data association (irda) standard. communication speeds of up to 4mbit/s are supported. when combined with analogue transducer components, it provides a complete interface between infra-red media and an amba-compliant peripheral bus (apb). the module comprises three separate encoder/decoder units for implementing three different combinations of modulation scheme and data encoding system defined by the irda standard. these are called the slow-, medium- and fast-infrared encoder/ decoders. sir, mir and fir the slow encoder/decoder (sir) is used to modulate and demodulate serial data only, using the hewlett-packard serial infrared standard (hp-sir) for bit encoding. serial transmit data from a uart (external to the ir interface module) is modulated using return-to-zero (rtz) encoding to produce an output to drive the ir transmitter led, while data received from the ir detector is converted into a serial bit stream to drive the uart serial input. the sir supports data rates of up to 115.2kbit/s. the medium speed encoder/decoder (mir) encodes/decodes peripheral bus data according to a modified hdlc standard, using flag characters, bit-stuffing and a 16-bit crc checker. rtz modulation and demodulation of the encoded data stream takes place in the same way as for the sir. two signal bit rates are specified: 0.576mbit/s and 1.152mbit/s. mir data and control bytes are memory mapped via the arm 7201 fast apb. the fast speed encoder/decoder (fir) operates at a fixed bit rate of 4mbit/s. modulation/demodulation is by a phase shift key scheme called pulse position modulation (4ppm) that uses one of four signalling symbols to represent each pair of data bits. data encoding uses a packet format that prefixes bit- and symbol- synchronization flags to data and appends a 32-bit crc and stop flag to the end of each packet. the start and stop flags use signalling symbols that are not used to encode data and hence bit-stuffing of data is not required in this mode. the fir also interfaces to the arm 7201 fast apb. only one of the encoder/decoder modules can be enabled to transmit and receive data from the irda transducers at one time. selection of an ir sub-module is by means of the irenable register. accordingly the mir and fir sub-modules can be regarded by programmers as independent entities which are operated using common control and data registers, but which report status data via separate read registers. detailed descriptions of the mir and fir are given in the following sections. the sir however has no data or control register associated with it, and interfaces directly to the uart serial streams. accordingly with the exception of the ir enable register, it has no presence on the memory map nor an interface to the apb. 12.3.2 common register description the infrared interface module uses a single mode register, irenable, to select which infrared interface module is selected. the medium and fast modules share a common control and data interface while maintaining separate status registers. the common registers used by both the fir and mir blocks are described below.
fast amba peripherals 12-18 GMS30C7201 data sheet 12.3.3 irenable register the register irenable selects which of the three ir sub-modules (sir, mir and fir) is used to operate the irda interface. only one of the three may be active at any one time. the reset value for this register is zero which disables all three encoder/decoder modules. the bottom two bits of this register select the encoder decoder module according to the tabulated values listed below. this register may also be used to enable a hardware loopback mode for the sub- module selected. loop back mode (lbm) the loop back mode (lbm) bit is used to enable and disable the ability of the ir transmit output to be fed back into the receive logic for diagnostic purposes. when lbm=0, the selected ir module operates normally. the transmit and receive data paths are independent and communicate via their respective pins. when lbm=1, the output of the transmit serial shifter is directly connected to the input of the receive serial shifter internally. note that even though the irda standard only permits half-duplex operation, this implementation does not restrict the user from transmitting and receiving data at the same time; both are fully independent units. transmitter disabled bits (fd/md) two read-only status bits are provided within this register: fd and md. when set these bits indicate that the fir/mir transmit module has completed transmission of the current frame and that it is safe to disable the module using bits en1 and en0. this feature simplifies clean switching between irda formats. irenable register: figure 12-2: ir enable register bits shows the register bits in ir enable. figure 12-2: ir enable register bits irenable value (en1,en0) encoder selected data rate (mbit/s) modulation scheme data interface 00 none - - - 01 sir 0 ? 0.1152 nrz + hp-sir serial port 10 mir 0.576 or 1.152 nrz + hdlc fast apb 11 fir 4.0 4ppm fast apb table 12-24: ir interface mode selection address: 0h80011000 irenable read/write bit 76543210 res. res. res. fd md lbm en1 en0 reset00011000
fast amba peripherals 12-19 GMS30C7201 data sheet 12.3.4 ir control register the ir control register (ircon) contains seven different bit-fields which control various functions for the mir and fir. baud rate divisor (brd) the 1-bit baud rate divisor (brd) field is used to select the baud or bit rate of the mir. two different baud rates can be selected:0.576mbit/s and 1.152mbit/s. the baud rate generator uses the 48mhz clock generated by the on-chip pll, divided down to the current data rate as defined by the brd bit. the receive baud clock is synchronized with the data steam each time a positive edge transition is detected on the receive data line. thus:  when brd=0, mir operates at 0.576mbit/s  when brd=1, mir operates at 1.152mbit/s this bit has no effect when the fir is selected. transmit buffer underrun select (tus) the transmit buffer underrun select (tus) bit is used both to select what action to take as a result of a transmit buffer underrun, as well as mask or enable the transmit buffer underrun interrupt. when tus=0, transmit buffer underruns are used to signal the transmit logic that the end of the frame has been reached. when the transmit buffer experiences an underrun, the crc value which is calculated continuously on outgoing data is loaded to the serial shifter and transmitted, followed by the stop flag and sip pulse. also when tus=0, the transmit buffer interrupt is masked and the state of the transmit buffer underrun (tur) status bit is ignored by the interrupt controller. when tus=1, transmit buffer underruns are used to signal the transmit logic that the end of the frame has not yet been reached and that the rate in which data is supplied to the transmit buffer is not sufficient. when the transmit buffer experiences an underrun zeroes are continuously output by the transmitter to signal an abort condition until data is once again available within the transmit buffer, and the crc value is discarded. additionally, when tus=1, the transmit buffer underrun interrupt is enabled, and whenever tur is set (one) an interrupt request is made to the interrupt controller. to change the state of this bit during operation, the user should fill the transmit buffer to ensure tus is not written at the same time the transmit buffer underruns. note that programming tus=0 does not affect the current state of tur or the transmit buffer logic ? s ability to set and clear tur, it only blocks the generation of the interrupt request. tus is useful for ensuring that frames are not prematurely ended due to an unexpected transmit buffer underrun. at the start of a frame the user may configure tus=1 such that any underrun signals an abort to the off-chip receiver. just before the end of the frame the user may then configure tus=0, allowing the remaining data to be output by the transmit logic. the buffer then underruns, causing the crc, stop flag, and sip to be transmitted. transmit enable (txe) the transmit enable (txe) bit is used to enable and disable the mir/fir transmit sub- module selected using the irenable register. when txe=0, the transmit logic is disabled and its clocks are turned off to conserve power. when txe=1, the transmitter logic is enabled for irda transmission. it is required that the user first program all other control bits before setting txe. if the txe bit is cleared to zero while the is actively transmitting data, transmission is stopped immediately, all data within the transmit
fast amba peripherals 12-20 GMS30C7201 data sheet buffer and serial output shifter is cleared. clearing txe to zero ensures the transmitter is disabled. note that txe is ignored by the sir (which is always enabled whenever selected by the irenable register). also note that even though the irda standard only permits half-duplex operation, this implementation does not restrict the user from transmitting and receiving data at the same time; both are fully independent units. this function is particularly useful when using loop back mode, described above. receive enable (rxe) the receive enable (rxe) bit is used to enable or disable mir/fir receive operation. when rxe=0, the receive logic is disabled and its clocks are turned off to conserve power. when rxe=1, the receiver logic is enabled for irda reception. it is required that the user first program all other control bits before setting rxe. if the rxe bit is cleared to zero while the ir interface is actively receiving data, reception is stopped immediately, all data within the receive buffer and serial input shifter is cleared. clearing rxe to zero ensures the selected ir receiver is disabled. note that rxe is ignored by the sir (which is always enabled whenever selected by the irenable register). also note that even though the irda standard only permits half-duplex operation, the fir does not restrict the user from transmitting and receiving data at the same time; both are fully independent units. this function is particularly useful when using the fir in loop back mode. receive buffer interrupt mask (rim) the receive buffer interrupt mask (rim) bit is used to mask or enable the receive buffer service request interrupt. when rim=0, the interrupt is masked, and the state of the receive buffer service request (rfs) bit within mir/fir status register 0 is ignored by the interrupt controller. when rim=1, the interrupt is enabled, and whenever rfs is set (one) an interrupt request is made to the interrupt controller. note that programming rim=0 does not affect the current state of rfs or the receive buffer logic ? s ability to set and clear rfs, it only blocks the generation of the interrupt request. also note that rim does not affect generation of the receive buffer dma request which is asserted whenever both rfs is set and the receiver buffer error/end flag (eif) is clear. transmit buffer interrupt mask (tim) the transmit buffer interrupt mask (tim) bit is used to mask or enable the transmit buffer service request interrupt. when tim=0, the interrupt is masked and the state of the transmit buffer service request (tfs) bit within mir/fir status register 0 is ignored by the interrupt controller. when tim=1, the interrupt is enabled, and whenever tfs is set (one) an interrupt request is made to the interrupt controller. note that programming tim=0 does not affect the current state of tfs or the transmit buffer logic ? s ability to set and clear tfs, it only blocks the generation of the interrupt request. tim does not affect generation of the transmit buffer dma request which is asserted whenever tfs is set. address match enable (ame) the address match enable (ame) bit is used to enable or disable the receive logic from comparing the address programmed in the address match value (amv) bit-field, to the address of all incoming frames. when ame is set (equals one), data is stored in the receive buffer only for those frames which have addresses that match amv, and for any frame which contains the broadcast address (0hff). for frames in which the address
fast amba peripherals 12-21 GMS30C7201 data sheet does not match, the data and crc are ignored, and the receiver resumes hunting for another data packet. when ame is clear (zero), address values are not compared and the data in every frame is stored in the receive buffer. figure 12-3: location of bits within ir control register shows the location of the bits within the ir control register. all bits are cleared (set to zero) following a reset of the arm 7201. note that the currently selected ir interface (mir or fir) must be disabled by clearing the enable bits in this register (rxe=txe=0) before selecting a different interface using the irenable register. the other bits in this register may be written while the interface is enabled to allow various modes to be changed during operation. figure 12-3: location of bits within ir control register address: 0h 80011004 ircon read/write bit 7 6 5 4 3 2 1 0 ame tim rim rxe txe tus brd - reset 0 0 0 0 0 0 0 ? bit name description 0 unused 1 brd mir bit rate select 0 - mir data rate is 0.576 mbit/s 1- mir data rate is 1.152 mbit/s 2 tus transmit buffer underrun select 0 - transmit buffer underrun causes crc, stop flag, and sip to be transmitted, and masks interrupt generation (tur ignored) 1 - transmit buffer underrun causes an abort to be transmitted, and generates an interrupt (state of tur sent to interrupt controller) 3 txe transmit enable 0 - ir transmit logic disabled 1 - ir transmit logic enabled 4 rxe receive enable 0 - ir receive logic disabled 1 - ir receive logic enabled 5 rim receive buffer interrupt mask 0 - receive buffer half-full or more condition does not generate an interrupt (rfs bit ignored) 1 - receive buffer half-full or more condition generates an interrupt (state of rfs sent to interrupt controller) table 12-25: ir control register
fast amba peripherals 12-22 GMS30C7201 data sheet 12.3.5 ir address match value register the ir address match value register (iramv) contains the 8-bit address match value field which is used by the mir and fir to selectively filter out unwanted received frames. address match value (amv) the 8-bit address match value (amv) field is programmed with an address value which is used to selectively store only the data within receive frames which have the same address value. the address match enable (ame) bit in ircon must be set to enable this function. for incoming frames which have the same address value as the amv field, the frame ? s address, control and data is stored in the receive buffer. for those that do not, the remainder of the frame is ignored, and the receive logic searches for the beginning of the next frame in the received data stream. a broadcast address exists which is always matched by the address match logic regardless of the value programmed in amv. when address matching is enabled, any time a frame is received with an address containing all ones (ffh), the value programmed in amv is ignored and the frame data is automatically stored in the receive buffer. the address value is contained within the first byte of data in a frame following the flag. amv can be written at any time, and is used for comparison for the next frame which occurs following its update. figure 12-4: address match value field in the iramv register shows the address match value field within ir address match value register. the reset state of amv is unknown and must be initialized before enabling the ir interface. note that iramv may be written while an ir interface is enabled to allow the address match value to be changed during active receive operation. figure 12-4: address match value field in the iramv register 6 tim transmit buffer interrupt mask 0 - transmit buffer half-full or less condition does not generate an interrupt (tfs bit ignored) 1 - transmit buffer half-full or less condition generates an interrupt (state of tfs sent to interrupt controller) 7 ame address match enable 0 - disable receiver address match function, store data from all incoming frames in receive buffer 1 - enable receiver address match function, do not buffer data unless address recognized or incoming address contains all ones (0hff) bit name description table 12-25: ir control register (continued) address: 0h80011008 iramv read/write bit 765 43210 amv reset??? ?????
fast amba peripherals 12-23 GMS30C7201 data sheet 12.3.6 ir data register the ir data register (irdata) is a 32-bit register corresponding to the transmit and receive buffers used by the mir and fir interfaces. receive data fifo when irdata is read, the lower 32 bits of the bottom entry of the 37-bit two-stage receiver buffer are accessed. bits 33-36 are used as tags to indicate various conditions which occur during reception of each piece of data. the tag bits are transferred down to the buffer along with the data word which encountered the condition. bit 32 of the buffer is automatically transferred to the end of frame (eof) flag, bit 33 to the crc error (cre) flag, and bit 34 to the receiver overrun (ror) flag, all within mir/fir status register 1. bits 35 and 36 indicate whether the received data word contains less than four valid data bytes, as occurs on the last word of a received packet that is not an integer multiple of four bytes long. the user can read these flags to determine if the value at the bottom of the buffer represents the last word within the frame and/or encountered an error during reception. after checking the flags, the buffer value can then be read. the end/error in fifo (eif) status bit is set within status register 0 whenever one or more of the tag bits (32-36) are set within the receive buffer. when eif is set, an interrupt is generated and the receive buffer dma request is disabled so that the user can manually empty the buffer, checking the end of frame, crc error, and overrun error flags in status register 1 first before removing each data value from the buffer. after the buffer is flushed, the user can re-enable dma servicing by clearing the eif bit. transmit data fifo when irdata is written, the transmit buffer is accessed. data is removed from the buffer one piece at a time by the transmit logic. unlike the receive data fifo, the transmit data fifo may only contain32-bit words. in order to transmit a frame containing a non- integer number of words (multiple of four bytes) the ir data tail register must be used to store the final one, two or three bytes of the frame (see 12.3.7 ir data tail register on page 12-24). figure 12-5: bit locations within the ir data register shows the bit locations corresponding to the data field, end of frame bit, as well as the cyclical redundancy check and receiver overrun error bits within the ir data register. note that both buffers bit name description 7 ? 0 amv address match value 8-bit value used by receiver logic to compare to address of incoming frames. if address matches store frame address, control and data in receive buffer; if address does not match, ignore frame and search for preamble. note: an address of 0hff (all 1) in the incoming frame automatically generates a match (amv is ignored). table 12-26: iramv register
fast amba peripherals 12-24 GMS30C7201 data sheet are cleared when the arm 7201 is reset. additionally the transmit buffer is cleared whenever the txe bit is written with a zero in ircon, and the receive buffer is cleared whenever the rxe bit is written with a zero. figure 12-5: bit locations within the ir data register 12.3.7 ir data tail register the ir data tail register (irdatatail) is a 24-bit write-only register used for transmitting frames whose payload data is not an integral multiple of four bytes long. irdatatail may be written to using one of three addresses. bits two and three of the address determine how many bytes within the word written are significant, i.e. are intended for transmission. if none of these addresses is written to the register remains marked as empty and payload data will be read by transmit logic from the 32-bit fifo only. the status of this register does not affect the tfs flag, nor does it cause interrupts or dma requests to be generated. address: 0h80011010 irdata read/write bit 34333231...543210 wst1 wst0 ror cre eof bottom of receive buffer data reset0 0 0 0 0 0...000000 read access (note: ror, cre, eof are not read, but rather transferred to corresponding status bits in misr1/fisr1 each time a new data value is transferred to the top position in irdata) bit31...543210 top of transmit buffer data reset0 ...000000 write access address bytes to be transmitted bits 0h80011014 least significant byte in word only bits 0 ? 7 0h80011018 least significant two bytes in word only bits 0 ? 15 0h8001101c least significant three bytes in data word bits 0 ? 23 table 12-27: data tail register addresses and bytes to be transmitted
fast amba peripherals 12-25 GMS30C7201 data sheet data is removed from this register by the transmit logic once the main transmit fifo (irdata) is empty. provided that the transmit fifo does not underrun prematurely, data from this register will form the last data bytes in a frame. the transmit logic will only begin to terminate a frame -- using either a crc or abort sequence -- once both the transmit fifo and the irdatatail register are empty. figure 12-6: bit locations within the ir data tail register the tail register is cleared whenever it is read by the transmit logic or the txe bit in ircon is cleared. figure 12-6: bit locations within the ir data tail register address:: 0h8001 1014 ... 0h8001 101c irdatatail write only bit 23 bit 0 byte 2 byte 1 byte 0
fast amba peripherals 12-26 GMS30C7201 data sheet 12.4 general configuration this section gives a programmer ? s guide to operating the irda interface. 12.4.1 select ir mode (sir/mir/fir) the irenable register selects which of the three ir sub-modules is used to operate the irda interface. only one of the three may be active at any one time. the reset value for this register is zero which disables all three encoder/decode modules. the bottom two bits of this register select the encoder decoder module according to the tabulated values listed in table 12-28: bit values to select ir module 12.4.2 sir operation sir does not use the data transfer mechanism implemented for mir and fir described in this section. after selecting sir mode, all data transfer operations are made through uart 2 as if connection is through a serial cable without handshake lines. for details of this operation see of chapter 13, 13.2.2 features where operation of the uart is explained. 12.4.3 select data rate the data rates for mir and fir are as follows: mir clear brd bit in ircon for 0.576 mbit/s set brd bit in ircon for 1.152 mbit/s fir fixed at 4 mbit/s irenable en1 irenable en0 encoder selected 0 0 none 01sir 1 0 mir 11fir table 12-28: bit values to select ir module
fast amba peripherals 12-27 GMS30C7201 data sheet 12.5 transmitting data this section deals with the initialization and transmit processes. 12.5.1 initialization the principal transfer of data from memory to the active irda encoder in mir and fir modes is by dma. dma transfers data in 4-byte words into the transmit fifo when requested by the ir block. as data frames are not necessarily a multiple of four bytes in length, there is a mechanism built into the ir peripheral for handling any bytes left over at the end of the data frame. this uses a register called irdatatail. before starting ir transfer, pushing the first two words of data into the transmit fifo will reduce system overheads.the ir peripheral can be configured to provide an additional level of error checking using the tus bit in the ircon register. this monitors the outgoing data flow and transmits an abort signal to the far end receiver if the transmit fifo becomes empty before the end of the frame is reached. 12.5.2 the transmit process this section describes the transmission process in detail. check that the previous transmission is complete ensure that the ir block is not currently receiving or transmitting data by reading the rsy (if half-duplex communications are in operation) and tby bits in irmisr1 or irfisr1 (depending on whether mir or fir mode is in operation). if either are set, the start of transmission is postponed. select transmit underrun action set the tus bit within the ircon register to ensure that if the ir encoder is starved of data it will signal an abort condition to the far-end receiver. pre-loading the transmit fifo copy the first two full words of data into the transmit fifo by writing them into the irdata register.the ir encode block can hold up to 11 bytes of data (two words in the fifo plus up to three bytes in the irdatatail register). if this is sufficient to hold the complete data packet to be transmitted, there will be no dma activity and the ircon tus bit should be cleared. this will cause the ir encoder to send the crc and end frame flag correctly. setting the dma buffer address, transfer length and mode dma channel 1 is used to transfer data to and from the ir block. the register details can be found in 12.2.5 dmac1 registers on page 12-8. 1 store the word-aligned address of the source data (not including the data already pre-loaded into the transmit fifo) in dmaadr1. 2 store the transfer length (number of words to be transferred by dma to the ir fifo) in dmatnr1. 3 clear dmaccr1.modsel (selects transfer from memory to io). 4 set dmaccr1.mask. this enables end of transfer interrupt. 5 set dmaccr1.dmen1. this enables dma transfer. 6 ensure that the master enable bit in the dmac operation register is set.
fast amba peripherals 12-28 GMS30C7201 data sheet sending packets which are not a multiple of 4 bytes in length the fifo is 32 bits wide. loading the fifo with less than 32 bits would cause extraneous zero-bits to be transmitted. the irdatatail register is a mechanism used to pre-load the last 1, 2 or 3 bytes of a frame. when the dma transfer is complete and the transmit fifo is empty, any bytes stored in the irdatatail register are transmitted before the ir encoder sends the crc and end of frame flags.there are three distinct addresses to write the end of frame data to. the addresses are given in table 12-29: addresses for end of frame data below. this allows a single word write to specify the data to be transmitted and the number of trailing bytes to send. if there is a single byte to transmit, write to address 0x80011014, for two bytes write to 0x80011018 and if there are three trailing bytes write to 0x8001101c. starting transmission set ircon.txe transmit enable bit. 12.5.3 end of frame end of buffer interrupt from dma dmaflagr.flag1 will be set when the number of words specified when initializing the dma transfer length. this can be checked in an interrupt service routine and cleared by writing a 1 to this bit.when this interrupt has occurred, all remaining data to transmit is either in the fifo or in the irdatatail register. at this point, clearing the tus bit in the ircon register will ensure that when transmission is complete the crc and end of frame flags are transmitted. disable transmit circuitry to save power, after completion of the frame transmission, clear the transmit enable (txe) bit in the irenable register. 12.5.4 error conditions transmit buffer underrun this is only signalled if ircon register bit tus is set to 1 as described in select transmit underrun action on page 12-27. bytes to transmit address to write to 1 0x80011014 2 0x80011018 3 0x8001101c table 12-29: addresses for end of frame data
fast amba peripherals 12-29 GMS30C7201 data sheet 12.6 receiving data any data error or reception of the end of frame will cause an interrupt to be generated which may be masked with the ircon.rim bit (receive interrupt mask). 12.6.1 initialization address matching to use address match filtering, set the local 8-bit address in the address match value register, and set the address match enable bit in the ircon register. set up dma for receive 1 store the destination address (word aligned) for incoming data in dmaaddr1. 2 store the maximum buffer size in words in dmatnr1. 3 set dmaccr1.modsel (selects transfer from io to memory) 4 set dmaccr1.mask (enables end of transfer interrupt) 5 set dmaccr1.dmen1 (enables dma transfer) 6 ensure that the master enable bit in the dmac operation register is set. enable ir receive set the receive enable bit (rxe) in irenable 12.6.2 end of frame end of frame interrupt an interrupt is generated when a complete frame has been received or when an error in the received data has been detected. to detect if the interrupt is due to reception of a complete frame or due to an error condition, different status registers are used depending on whether mir or fir is in operation. in this description, sr0 and sr1 are referred to. in mir mode, these would be irmsr0 and irmsr1. in fir these would be irfsr0 and irfsr1. note bit positions for flags in irmsr1 and irfsr1 are not identical. completing received data transfer if sr0.rfs (receive buffer service request flag) is set, then there is valid data in the ir fifo which has not been moved by dma into the external buffer. sr0.wst0 & sr0.wst1 indicate how many valid bytes there are in the top entry of the fifo. if both bits are zero then there are four valid bytes in the top entry of the fifo. to append the data to the data already transferred by dma, the address of the next word in the dma buffer must be calculated. the address can be found by subtracting the current value in dmatnr1 (transfer count) from the original value to get the number of words already transferred. this value can then be added to dmaadr1 to give the destination for the word read from irdata. in general, there will be 1 to 4 bytes in the receive fifo, but in exceptional circumstances it is possible that there is another entry in the ir fifo, so sr0.rfs should be checked and if necessary the next entry (one to four bytes, indicated by sr0.wst0 & sr0.wst0) appended to the input buffer.
fast amba peripherals 12-30 GMS30C7201 data sheet 12.6.3 error conditions input buffer overrun a dma interrupt for the ir channel during ir receive indicates that the incoming data has exceeded the buffer length programmed into the dma. receiver abort detected sr0.rab indicates, when set, that the far-end transmitter sent an abort signal during frame transmission. receiver overrun sr1.ror indicates that new data was received while the ir receiver fifo was full. this could occur when dma has been stopped or in the unlikely event of the interrupt service routine not transferring the last two words from the fifo at the end of a frame. crc error if the crc for the received data does not match the crc value contained in the incoming data stream, sr1.crc will be set. frame error (fir only) irfsr0.fre indicates that a framing error has been detected. these error flags are cleared by reading irdata, at which point the error flags associated with the next word in the fifo (if present) are transferred into the status registers.
fast amba peripherals 12-31 GMS30C7201 data sheet 12.7 special conditions this section deals with actions associated with changing ir operating modes. 12.7.1 early termination of transmission clearing ircon.txe (transmit enable bit) stops any transmission in progress and clears all data within the fifo, transmit buffer and serial output shifter. 12.7.2 early termination of reception clearing ircon.rxe receive enable bit stops reception immediately. all data within the receive buffer, serial input shifter and fifo is cleared. 12.7.3 changing irda mode poll fd or md bit in irenable register until end of transmission is indicated.the new mode can then be set as described in 12.4 general configuration . 12.7.4 loopback mode for test purposes, data will be looped back from the output of the transmit serial shifter into the input of the receive serial shifter when irenable.lbm is set.
fast amba peripherals 12-32 GMS30C7201 data sheet 12.8 medium speed infra-red port (mir) the mir comprises a dedicated serial port and rtz modulator/demodulator supporting the infrared data association (irda) standard for transmission/reception at 0.576 and 1.152mb/s. frames contain an 8-bit address, an optional control field, a data field of any size that is a multiple of 8-bits and a 16-bit crc-ccitt. the start/stop flag and crc generation/ checking is handled automatically. data can be selectively saved in the receive buffer by programming an address with which to compare against all incoming frames. interrupts are signalled when crc checks performed on received data indicate an error, when a receiver abort occurs, when the transmit buffer underruns during an active frame and is aborted, when the receive buffer overruns and data is lost. 12.8.1 mir (medium-speed infrared) operation following reset, the mir is disabled. reset also causes the transmit and receive buffers and tail register to be flushed (buffers marked as empty). before enabling the mir, the user must first clear any writable or ? sticky ? status bits that are set by writing a one to each bit. (a sticky bit is a readable status bit that may be cleared by writing a one to its location.) next, the desired mode of operation is programmed in the control register. at this point the user may ? prime ? the transmit buffer by writing the first data word for transmission and any tail bytes, or the buffer can remain empty and either programmed i/o or the dma may be used to service it after the mir is enabled. once the mir is enabled, transmission/reception of data can begin on the transmit and receive pins. bit encoding the mir bit encoding uses an rzi modulation scheme where a ? 0 ? is represented by a light pulse. for both 0.576 and 1.152mb/s data rates, the optical pulse duration is normally 1 / 4 of a bit duration. for example, if the data frame (in the order of transmission) is 11010010, then figure 12-7: rz1/nrz bit encoding example represents the signal that is actually transmitted. figure 12-7: rz1/nrz bit encoding example frame format mir uses a flag (reserved bit pattern) to denote the beginning and end of a frame of information and to synchronize frame transmission. a double flag is used to indicate the start of a frame, and a single flag the end. the flag contains eight bits, which start and end with a zero and contain six sequential ones in the middle (01111110). this sequence of six ones is unique because all data between the start and stop flag is prohibited from having more than five consecutive ones. data that violates this rule is altered before transmission by automatically inserting a zero after five consecutive ones are detected in the transmitted bit stream. this technique is commonly referred to nrz data bit value 11010010 lsb msb rz1
fast amba peripherals 12-33 GMS30C7201 data sheet as ? bit stuffing ? and is transparent to the user. the information field within a mir frame is placed between the start and stop flags, consisting of an 8-bit address, an optional 8-bit control field, a data field containing any multiple of 8-bits and a 16-bit cyclical redundancy check (crc-ccitt). note that each byte within the address, control and data fields is transmitted and received lsb first, ending with the byte ? s msb. however, the crc is transmitted and received msb first.the mir frame format is outlined below in figure 12-8: mir frame format . figure 12-8: mir frame format address field the 8-bit address field is used by a transmitter to target a select group of receivers when multiple stations are connected using the infrared link. the address allows up to 255 stations to be uniquely addressed (00000000 to 11111110). the global address (11111111) is used to broadcast messages to all stations. the serial port contains an 8-bit register that is used to program a unique address for broadcast recognition as well as a control bit to enable/disable the address match function. note that the address of received frames is stored in the receive buffer along with normal data, and that it is transmitted and received starting with its lsb and ending with its msb. control field the mir control field is typically 8-bits, but can be any length. the serial port does not provide any hardware decode support for the control byte, but instead treats all bytes between the address and the crc as data. thus any control bits appear as data to the programmer. note that the control field is transmitted and received starting with its lsb and ending with its msb. data field the data field can be any length that is a multiple of 8 bits, including zero. the user determines the data field length according to the application requirements and transmission characteristics of the target system. usually a length is selected which maximizes the amount of data that can be transmitted per frame, while allowing the crc checker to be able to consistently detect all errors during transmission. all data fields must be a multiple of 8 bits. if a data field that is not a multiple of 8 bits is received, an abort is signalled and the end of frame tag is set within the receive buffer. also note that each byte within the data field is transmitted and received starting with its lsb and ending with its msb. crc field mir uses the established ccitt cyclical redundancy check (crc) to detect bit errors that occur during transmission. a 16-bit crc-ccitt is computed using the address, control and data fields, and is included in each frame. a separate crc generator is implemented in both the transmit and receive logic. the transmitter calculates a crc 8 bits 8 bits 8 bits 8 bits (optional) any multiple of 8 bits 16 bits 8 bits start flag 0111 1110 start flag 0111 1110 address control data crc- ccitt stop flag 0111 1110
fast amba peripherals 12-34 GMS30C7201 data sheet while data is actively transmitted, and places the 16-bit value at the end of each frame before the stop flag is transmitted. the receiver calculates a crc for each received data frame, and compares the calculated crc to the expected crc value contained within the end of each received frame. if the calculated value does not match the expected value, an interrupt is signalled. the crc computation logic is preset to all ones before reception/transmission of each frame. note that the crc is transmitted and received starting with its msb and ending with its lsb. the crc uses the four- term polynomial: baud rate generation the baud or bit rate is derived by dividing down the 48mhz clock generated by the on- chip pll. the clock is first divided down by 10 and five-twelfths, then either 1 (brd=1) or 2 (brd=0), and then by a fixed value of four, generating the transmit clock for 1.152mb/s and 0.576mb/s data rates, respectively. the receive clock is generated by the receiver digital phase locked loop (dpll). the dpll uses a sample clock that is undivided. a sample rate counter (incremented at the sample clock rate) is used to generate a receive clock at the nominal data rate (sample clock divided by 41 and two- thirds). the sample rate counter is reset on the detection of each positive-going data transition (indicating the rzi encoding of a ? 0 ? ) to ensure that synchronization with the incoming data stream is maintained. receive operation once the mir receiver is enabled it enters hunt mode, searching the incoming data stream for the flag (01111110). the flag serves to achieve bit synchronization, denotes the beginning of a frame, and delineates the boundaries of individual bytes of data. the end of the flag denotes the beginning of the address byte. once the flag is found, the receiver is synchronized to incoming data and hunt mode is exited. after each bit is decoded, a serial shifter is used to receive the incoming data a byte at a time. once the flag is recognized, each subsequent byte of data is decoded and placed within a two-byte temporary buffer. a temporary buffer is used to prevent the crc from being placed within the receive buffer. when the temporary buffer is filled, data values are pushed out one by one to the receive buffer. the first byte of a frame is the address. if receiver address matching is enabled, the received address is compared to the address programmed in the address match value field in a control register. if the two values are equal or if the incoming address contains all ones, all subsequent data bytes including the address byte are stored in the receive buffer. if the values do not match, the receive logic does not store any data in the receive buffer, ignores the remainder of the frame and begins to search for the stop flag. the second byte of the frame can contain an optional control field that must be decoded in software (there is no hardware support within the mir). use of a control byte is determined by the user. when the receive buffer is filled, a dma request is signalled. if the data is not removed soon enough and the buffer is completely filled, an overrun error is generated when the receive logic attempts to place additional data into the full buffer. once the buffer is full, all subsequent received data are lost while the buffer contents remain intact. frames can contain any amount of data in multiples of 8-bits. although the mir protocol does not limit frame size, in practice they tend to be implemented in numbers ranging from hundreds to a couple of thousand bytes. the receive logic continuously searches for the stop flag at the end of the frame. once it is recognized, the last byte that was placed within the receive buffer is flagged as the last byte of the frame, and the two bytes remaining within the temporary buffer are removed and used as the 16-bit crc value for the frame. instead of placing this in the receive buffer, the receive logic compares it to the crc-ccitt value which is crc x () x 16 x 12 x 5 1 +++ () =
fast amba peripherals 12-35 GMS30C7201 data sheet continuously calculated using the incoming data stream. if they do not match, the last byte that was placed within the receive buffer is also flagged with a crc error. the crc value is not placed in the receive buffer. the mir protocol permits back to back frames to be received. when this occurs, three flags separate back to back frames. most commercial irda transceivers can generate an abort (7 to 13 ones) when their transmit buffer underruns. the receive logic contains a counter that increments each time a one is decoded before entering the serial shifter, and is reset any time a zero is decoded. when seven or more ones are detected, a receiver abort occurs. note that data is moved from the serial shifter to the temporary buffer a byte at a time, and seven consecutive ones may bridge two bytes. for this reason, after an abort is detected, the remaining data in the serial shifter is discarded along with the most recent byte of data placed in the temporary buffer. after this data is discarded, the oldest byte of data in the temporary buffer is placed in the receive buffer, the eof tag is set within the top entry of the buffer (next to the byte transferred from the temporary buffer), the receiver abort interrupt is signalled, and the receiver logic enters hunt mode until it recognizes the next flag. if the user disables the receiver during operation, reception of the current data byte is stopped immediately, the serial shifter and receive buffer are cleared, and all clocks used by the receive logic are automatically shut off to conserve power. transmit operation the user may either ? prime ? the transmit buffer by filling it with data or allow service requests to cause the dma to fill the buffer once the mir transmitter is enabled. once enabled, the transmit logic issues a service request if its buffer is empty. a serial infrared interaction pulse (sip) is transmitted in order to guarantee non-disruptive co- existence with slower (up to 115.2kb/s) systems, for example another GMS30C7201 device attempting to use its sir. this is followed by continuous transmission of flags until valid data resides within the buffer. once a byte of data resides at the bottom of the transmit buffer, it is transferred to the serial shifter, is encoded and shifted out onto the transmit pin clocked by the programmed baud rate clock. note that the flag and crc value are automatically transmitted and need not be placed in the transmit buffer. when the transmit buffer is emptied, an interrupt and/or dma service request is signalled. if new data is not supplied soon enough, the buffer is completely emptied and the transmit logic attempts to take additional data from the empty buffer, one of two actions can be taken as programmed by the user. an underrun can either signal the normal completion of a frame or an unexpected termination of a frame in progress. when normal frame completion is selected and an underrun occurs, the transmit logic transmits the 16-bit crc value calculated during the transmission of all data within the frame (including the address and control bytes), followed by a flag to denote the end of the frame. the transmitter then transmits an sip, followed by a continuous transmission of flags until data is once again available within the buffer. once data is available, the transmitter begins transmission of the next frame. when unexpected frame termination is selected and an underrun occurs, the transmit logic outputs an abort and interrupts the cpu. an abort continues to be transmitted until data is once again available in the transmit buffer. the mir then transmits an sip, followed by a double flag and starts the new frame. the off-chip receiver may choose to ignore the abort and continue to receive data, or to signal the serial port to retry transmission of the aborted frame. if the user disables the transmitter during operation, transmission of the current data byte is stopped immediately, the serial shifter and transmit buffer are cleared, and all clocks used by the transmit logic are automatically shut off to conserve power.
fast amba peripherals 12-36 GMS30C7201 data sheet cpu and dma register access sizes bit positioning, byte ordering and addressing of the mir are described in terms of little endian ordering. all mir control and status registers are 8-bits wide and are located in the least significant byte of individual words. transmit and receive data buffers are 32 bits wide, with the first byte to be transmitted/ or received located in the least significant byte position. the arm peripheral bus does not support byte or half-word operations. all reads and writes of the mir by the cpu should be word wide. separate dma requests exist for the transmit and the receive buffer. if the dma controller is used to service the transmit and/or receive buffers, the user must ensure the dma is properly configured to perform single word-wide accesses. burst mode dma is not supported by the peripheral. refer to table 12-34: ir interface block registers and their physical addresses on page 12-52 for a summary of the mir serial port ? s registers. 12.8.2 mir register definitions the mir uses the control and data registers described in the previous section. these are shared with the fir interface and can only be used with the mir when the mir is selected using the irenable register. in addition to the shared registers there are two status registers specific to the mir. the status registers contain bits that signal crc, overrun, underrun and receiver abort errors as well as the transmit buffer service request, receive buffer service request and end of frame conditions. detection of end of frame, underrun and receiver abort errors signal interrupt requests to the interrupt controller. the status registers also contains flags for transmitter busy, receiver synchronized, receive buffer not empty, transmit buffer not full and receive transition detect (no interrupt is generated). 12.8.3 mir status register 0 mir status register 0 (misr0) contains bits that signal the transmit buffer service request, receive buffer service request, receiver abort, transmit buffer underrun and the end/error in receive buffer condition. detection of receiver abort, transmit buffer underrun and the end/error in receive buffer condition signal an interrupt request to the interrupt controller. bits that cause an interrupt signal the interrupt request as long as the bit is set. once the bit is cleared, the interrupt is cleared. read/write bits are called status bits, read- only bits are called flags. status bits are referred to as ? sticky ? (once set by hardware, they must be cleared by software). writing a one to a sticky status bit clears it, writing a zero has no effect. read-only flags are set and cleared by hardware, writes have no effect. end/error in buffer status (eif)(read-only) the end/error in buffer flag (eif) is a read-only bit that is set when any tag bits (32-36) are set in either entry of the receive buffer, and is cleared when no error bits are set within the buffer. when eif is set an interrupt is signalled and dma requests to empty the receive buffer are disabled until eif is cleared. once all set tag bits are cleared from the receive buffer, eif is automatically cleared, which in turn clears the interrupt and re-enables the receive buffer dma request. transmit underrun status (tur) (read/write) the transmit underrun status bit (tur) is set when the transmit logic attempts to fetch data from the transmit buffer while it and the tail register are empty. when an underrun occurs, the transmitter takes one of the following two actions. when the transmit underrun select bit is clear (tus=0) the transmitter ends the frame by shifting out the crc which is calculated continuously on outgoing data, followed by a flag. when tus=1, the transmitter is forced to transmit an abort and continues to transmit ones until valid data is again available within the buffer. once data resides in the transmit
fast amba peripherals 12-37 GMS30C7201 data sheet buffer, a new data frame is initiated by transmitting an sip and a start flag followed by the transmission of data from the buffer. when the tur bit is set, an interrupt request is made. note that underruns are not generated when the mir transmitter is first enabled and is in the idle state (continuously transmits flags). receiver abort status (rab)(read/write) the receiver abort status bit (rab) is set for two different cases:  when an abort is detected during receipt of an incoming frame  if the stop flag is not received on a byte boundary. an abort is signalled when seven or more consecutive ones are detected in the incoming data stream. it is also generated when the end flag is received and it is not on a byte boundary, which indicates that the address, control and data fields did not add up to an even multiple of 8-bits. when an abort is detected, the current data byte within the serial shifter is discarded, the least recent byte (the oldest of the two bytes) of data in the temporary buffer is moved to the receive buffer (the other byte is discarded), and the eof tag is set in the buffer entry that corresponds to the last piece of data that was received before the frame was aborted. the receiver then enters hunt mode, searching for a flag. when the rab bit is set, an interrupt request is made. transmit buffer service request flag (tfs)(read-only) the transmit buffer service request flag (tfs) is a read-only bit that is set when the transmit buffer is not full and requires service to prevent an underrun. the state of tfs is also sent to the dma controller, and may be used to signal a dma service request. after the dma or cpu fills the buffer, the tfs flag (and the service request) is automatically cleared. receive buffer service request flag (rfs) (read-only) the receive buffer service request flag (rfs) is a read-only bit that is set when the receive buffer contains valid data. the state of rfs is also sent to the dma controller, and may be used to signal a dma service request. after the dma or cpu empties the buffer, the rfs flag (and the service request) is automatically cleared. figure 12-9: bit locations in mlr status register 0 shows the bit locations corresponding to the status and flag bits within mir status register 0. note that the reset state of all writable status bits is unknown and must be cleared (by writing a one to them) before enabling the mir. also note that writes to reserved bits are ignored and reads return zeros. figure 12-9: bit locations in mlr status register 0 address: 0h 8001 1080 misr0 read/write & read-only bit 7 6 5 4 3 2 1 0 wst1 wst0 res rfs tfs rab tur eif reset 0 0 0 0 0 ? ? 0
fast amba peripherals 12-38 GMS30C7201 data sheet 12.8.4 mir status register 1 (misr1) mir status register 1 (misr1) contains flags and status bits that indicate when the receiver is synchronized, the transmitter is active, that the transmit buffer is not full, that the receive buffer is not empty, a transition has been detected on the receive line, and when an end of frame, crc error, or underrun error has occurred. all bits within misr1 are non-interrupting. receiver synchronized flag (rsy) (read-only) the receiver synchronized (rsy) flag is a read-only bit that is set when the receiver is synchronized with the incoming data stream, and is cleared when the receiver logic is in hunt mode (looking for a flag to achieve bit and frame synchronization), or the receiver is disabled (rxe=0). bit name description 0 eif error in buffer (read-only) 0 - bits 32-36 are clear within each valid entry of the receive buffer, receive buffer dma service requests are enabled 1 - one or more tag bits (32-36) are set within one or more entries in the receive buffer, request interrupt, disable receive buffer dma service requests 1tur transmit buffer underrun 0 - transmit buffer has not experienced an underrun 1 - transmit logic attempted to fetch data from transmit buffer while it and the tail register were empty, interrupt request signalled 2 rab receiver abort 0 - no abort has been detected for the incoming frame 1 - abort detected during receipt of incoming frame, seven or more ones detected on receive pin, eof bit set in receive buffer next to last piece of ? good ? data received before the abort, interrupt requested 3tfs transmit buffer service request (read-only) 0 - transmit buffer is full or the transmitter disabled 1 - transmit buffer is not full and the transmitter is enabled, dma service request signalled 4 rfs receive buffer service request (read-only) 0 - receive buffer is empty or the receiver disabled 1 - receive buffer is not empty and the receiver is enabled. dma service request is signalled unless the receive buffer contains either an error or the final byte in a frame (indicated by eif set). 5- reserved 7-6 wst receive word width status 00 - all four bytes in receive buffer are valid 01 - least significant byte valid only 10 - least significant two bytes valid only 11 - least significant three bytes valid only table 12-30: mir status register 0
fast amba peripherals 12-39 GMS30C7201 data sheet transmitter busy flag (tby) (read-only) the transmitter busy (tby) flag is a read-only bit that is set when the transmitter is actively transmitting a frame (address, control, data, crc, start or stop flag), and is cleared when the transmitter is idle (transmitting flags that are not part of a frame), or the transmitter is disabled (txe=0). receive transition detect status (rtd) (read/write) the receive transition detect (rtd) status bit is set whenever the receiver is enabled (rxe=1), and a positive edge transition is detected on the rxd1 pin. end of frame flag (eof) (read-only) the end of frame flag (eof) is set when the last byte of data within a frame (including aborted frames) resides within the bottom entry of the receive buffer. the receive buffer contains three tag bits (32, 33 and 34) that are not directly readable. the 32nd bit is set at the top of the buffer whenever the last byte within a frame is moved from the receive serial shifter to the receive buffer. this tag travels along with the last data value to the buffer. crc error status (cre) (read-only) the crc error flag (cre) is set when the crc value calculated by the receive logic does not match the crc value contained within the incoming serial data stream. whenever a crc error is detected, the 33rd bit is set within the top entry of the receive buffer corresponding to the last byte of data within the frame receiver overrun status (ror) (read-only) the receiver overrun flag (ror) is set when the receive logic attempts to place data into the receive buffer after it has been filled. the 34th bit is set within the top entry of the receive buffer whenever an overrun occurs. this tag travels along with the last ? good ? data value before the overflow occurred. figure 12-10: bits within mir status register 1 shows the location of the flag and status bits within mir status register 1. the bits within this register do not produce interrupt requests. note that the reset value of rtd is unknown and must be cleared if set following a reset of the arm 7201. the remainder of fidr is read-only (writes are ignored). figure 12-10: bits within mir status register 1 address: 0h 8001 1084 misr1 read/write & read-only bit 76543210 ror cre eof rtd tby rsy reset00000000
fast amba peripherals 12-40 GMS30C7201 data sheet bit name description 0 rsy receiver synchronized flag (read-only) 0 - receiver is in hunt mode or is disabled 1 - receiver logic is synchronized with the incoming data 1tby transmitter busy flag (read-only) 0 - transmitter is idle (continuous flags), or disabled, or an abort is being transmitted 1 - transmit logic is currently transmitting a frame (address, control, data, crc, or start/ stop flag) 2 - unused 3- unused 4 rtd receive transition detect 0 - no transition detected on receiver pin since the last time s/w cleared this bit 1 - rising edge detected on receiver pin 5eof end of frame (read-only) 0 - current frame has not completed 1 - the value in the receive buffer contains the last byte of data within the frame 6 cre crc error (read-only) 0 - no crc check errors encountered in the receipt of data 1 - crc calculated on the incoming data does not match crc value contained within the received frame 7ror receive buffer overrun (read-only) 0 - receive buffer has not experienced an overrun 1 - receive logic attempted to place data into receive buffer while it was full, the next data value in the buffer is the last piece of ? good ? data before the buffer was overrun table 12-31: mir status register 1
fast amba peripherals 12-41 GMS30C7201 data sheet 12.9 fast infrared port (fir) the fast infrared port (fir) operates at half-duplex and provides direct connection to commercially available infrared data association (irda) compliant led transceivers. the fir supports the 4.0mbps irda standard, using four pulse position modulation (4ppm) and a specialized serial packet protocol developed expressly for irda transmission. high speed fir operation before enabling the fir for high-speed operation, the user must first clear any writable or ? sticky ? status bits which are set by writing a one to each bit. next, the desired mode of operation is programmed in the control registers. at this point the user may ? prime ? the fir ? s transmit buffer by writing the first data word, or the buffer can remain empty and either programmed i/o or the dma may be used to service it after the fir is enabled. once the fir is enabled, transmission/reception of data can begin on the transmit and receive pins. the fir ? s frame formats are outlined below. 4ppm modulation four position pulse modulation (4ppm) is used for the high-speed transmission rate of 4.0mbps. payload data is divided into data bit pairs (dbps) for encoding with lsbs transmitted first. each dbp is represented by one of four symbols (dds) comprising a single 125ms pulse within a 500ms symbol period. the 125ms quarters of a symbol are known as ? chips ? . the resulting signal waveform for the four data dds is shown in figure 12-11: 4ppm modulation encoding . figure 12-12: 4ppm modulation example on page 12-42 shows an example of 4ppm modulation of the byte, 0b10110001 which is constructed using four dbps. note that bits within each dbpare not reordered, but the least significant dbp is transmitted first. figure 12-11: 4ppm modulation encoding two-bit symbol chip 1234 dbp = 00 dbp = 01 dbp = 10 dbp = 11
fast amba peripherals 12-42 GMS30C7201 data sheet figure 12-12: 4ppm modulation example 4.0mbps fir frame format when the 4.0mbps transmission rate is used, the high-speed serial/parallel (fir) interface within the fir is used along with the 4ppm bit encoding. the high-speed frame format shown in figure 12-13: high speed serial frame format for irda transmission (4.0mbps) on page 12-43 is similar to the sdlc format with several minor modifications: the start/stop flags and crc are twice as long, and instead of one start flag, a preamble and start flag of differing length are used. 4ppm data reordered nibbles 01001110 chips 1234123412341234 dbp 1 2 34 receive data sample counter frequency = 6x pulse width, each time-slot sampled on third clock original byte order 10110001 pair 3pair 2pair 1pair 0 pair 0pair 1pair 2pair 3 125ns stream time
fast amba peripherals 12-43 GMS30C7201 data sheet figure 12-13: high speed serial frame format for irda transmission (4.0mbps) the preamble, start, and stop flags are a mixture of symbols which contain either 0, 1, or 2 pulses within the four time-slots. symbols with 0 and 2 pulses are used to construct flags since they represent invalid data bit pairings (one pulse required per symbol to represent one of four bit pairs). the preamble contains sixteen repeated transmissions of the four symbols: 1000 0000 1010 1000, the start flag contains one transmission of eight symbols: 0000 1100 0000 1100 0110 0000 0110 0000, and the stop flag contains one transmission of eight symbols: 0000 1100 0000 1100 0000 0110 0000 0110. the address, control, data, and crc-32 all use the standard 4ppm dds described above. address field the 8-bit address field is used by a transmitter to target a select group of receivers when multiple stations are connected to the same set of serial lines. the address allows up to 255 stations to be uniquely addressed (00000000 to 11111110). the global address (11111111) is use to broadcast messages to all stations. serial port 1 contains an 8-bit register which is used to program a unique address for broadcast recognition as well as a control bit to enable/disable the address match function. note that the address of received frames is stored in the receive buffer along with normal data, and that it is transmitted and received starting with its lsb and ending with its msb. control field the ipc control field is 8-bits and is optional (as defined by the user). the fir does not provide any hardware decode support for the control byte, but instead treats all bytes between the address and the crc as data. note that the control field is transmitted and received starting with its lsb and ending with its msb. data field the data field can be any length which is a multiple of 8-bits, from 0 to 2045 bytes. the user determines the data field length according to the application requirements and transmission characteristics of the target system. usually a length is selected which maximizes the amount of data which can be transmitted per frame, while allowing the 64 symbols 8 symbols 4 dds (8 bits) 4 dds (8 bits) 8180 dds max (2045 bytes) 16 dds (32 bits) 8 symbols preamble start flag address control (optional) data crc-32 stop flag start flag |0000|1100|0000|1100|0110|0000|0110|0000| |0000|1100|0000|1100|0000|0110|0000|0110| stop flag preamble |1000|0000|1010|1000|... repeated 16 times
fast amba peripherals 12-44 GMS30C7201 data sheet crc checker to be able to consistently detect all errors during transmission. note that the serial port does not contain any hardware which restricts the maximum amount of data transmitted or received. it is up to the user to maintain these limits. if a data field which is not a multiple of 8-bits is received an abort is signalled. also note that each byte within the data field is transmitted and received starting with its lsb and ending with its msb. crc field the fir uses the established 32-bit cyclical redundancy check (crc-32) to detect bit errors which occur during transmission. a 32-bit crc is computed using the address, control, and data fields, and is included in each frame. a separate crc generator is implemented in both the transmit and receive logic. the transmitter calculates a crc while data is actively transmitted byte shifting each byte transmitted through its serial shifter lsb first, then places the inverse of the resultant 32-bit value at the end of each frame before the flag is transmitted. in a similar manner, the receiver also calculates a crc for each received data frame, and compares the calculated crc to the expected crc value contained within the end of each received frame. if the calculated value does not match the expected value, an interrupt is signalled. the crc computation logic is preset to all ones before reception/transmission of each frame and the result is inverted before it used for comparison or transmission. note that unlike the address, control, and data fields, the 32-bit inverted crc value is transmitted and received from least significant byte to most significant, and within each byte the least significant nibble is encoded/decoded first. the cyclical redundancy checker uses the 32 term polynomial: baud rate generation the baud rate is derived by dividing down a fixed 48mhz clock generated by one of the two on-chip plls by six. the 8mhz baud (time-slot) clock for the receive logic is synchronized with the 4ppm data stream each time a transition is detected on the receive data line using a digital pll. to encode a 4.0mbps data stream, the required ? symbol ? frequency is 2.0mhz, with four chips per symbol at a frequency of 8.0mhz. receive data is sampled half way through each time-slot period by counting three out of the six 48mhz clock periods which make up each chip. refer to figure 12-12: 4ppm modulation example on page 12-42. the symbols are synchronized during preamble reception. recall that the preamble consists of four symbols repeated sixteen times. this repeating pattern is used to identify the first time-slot or beginning of a symbol, and resets the two-bit chip counter logic, such that the 4ppm data is properly decoded. receive operation the irda standard specifies that all transmission occurs at half-duplex. this restriction forces the user to enable one direction at a given time; either the transmit or receive logic, but not both. however, the fir ? s hardware does not impose such a restriction.the user may enable both the transmitter and receiver at the same time. although forbidden by the irda standard, this feature is particularly useful when using the fir ? s loop back mode, which internally connects the output of the transmit serial shifter to the input of the receive serial shifter.  ut  tx  tu  tt  sx  st  ss  sr  z  y  w  v  ++++++++++++ (
fast amba peripherals 12-45 GMS30C7201 data sheet after the fir is enabled for 4.0mbps transmission, the receiver logic begins by selecting an arbitrary symbol boundary, receives four incoming 4ppm symbols from the input pin using a serial shifter, and latches and decodes the symbols one at a time. if the symbols do not decode to the correct preamble, the chip counter ? s clock is forced to skip one 8mhz period, effectively delaying the chip count by one. this process is repeated until the preamble is recognized, signifying that the chip counter is synchronized. the preamble may be repeated as few as sixteen times, or may be continuously repeated to indicate an idle receive line. at any time after the transmission of sixteen preambles, the start flag may be received. the start flag is eight symbols long. if any portion of the start flag does not match the standard encoding, the receive logic signals a framing error and the receive logic once again begins to look for the frame preamble. once the correct start flag is recognized, each subsequent grouping of four dds is decoded into a data byte, placed within a five byte temporary buffer which is used to prevent the crc from being placed within the receive buffer. when the temporary buffer is filled, data values are pushed out one by one to the receive buffer. the first data byte of a frame is the address. if receiver address matching is enabled, the received address is compared to the address programmed in the address match value field in one of the control registers. if the two values are equal or if the incoming address contains all ones, all subsequent data bytes including the address byte are stored in the receive buffer. if the values do not match, the receiver logic does not store any data in the receive buffer, ignores the remainder of the frame, and begins to search for the next preamble. the second data byte of the frame can contain an optional control field as defined by the user and must be decoded in software (there is no hardware support within the fir). frames can contain any amount of data in multiples of 8-bits up to a maximum of 2047 bytes (including the address and control byte). the fir does not limit frame size, thus it is the responsibility of the user to check that the size of each incoming frame does not exceed the irda protocol ? s maximum allowed frame size. when the receive buffer is filled, an interrupt or dma transfer is signalled. if the data is not removed quickly enough, an overrun error is signalled when the receive logic attempts to place additional data into the full buffer. once the buffer is full, all subsequent data bytes received are lost while all buffer contents remain intact. if any two sequential symbols within the data field do not contain pulses (are 0000), the frame is aborted, the least recent or oldest byte within the temporary buffer is moved to the receive buffer (the remaining four buffer entries are discarded), the end of frame (eof) tag is set within the same buffer entry where the last ? good ? byte of data resides, and the receiver logic begins to search for the preamble. an abort also occurs if any data symbol containing 0011, 1010, 0101, or 1001 occurs (invalid symbols which do not occur in the stop flag). the receive logic continuously searches for the 8-symbol stop flag. once it is recognized, the last byte which was placed within the receive buffer is flagged as the last byte of the frame and the data in the temporary buffer is removed and used as the 32-bit crc value for the frame. instead of placing this in the receive buffer, the receive logic compares it to the crc-32 value which is continuously calculated using the incoming data stream. if they do not match, the last byte which was placed within the receive buffer is also tagged with a crc error. the crc value is not placed in the receive buffer. if the user disables the fir ? s receiver during operation, reception of the current data byte is stopped immediately, the serial shifter and receive buffer are cleared, and all clocks used by the receive logic are automatically shut off to conserve power.
fast amba peripherals 12-46 GMS30C7201 data sheet transmit operation before enabling the fir for transmission, the user may either ? prime ? the transmit buffer by filling it with data or allow service requests to cause the cpu or dma to fill the buffer once the fir is enabled. once enabled, the transmit logic issues a service request if its buffer is empty. for each frame output, a minimum of sixteen preambles are transmitted. if data is not available after the sixteenth preamble, additional preambles are output until a byte of valid data resides within the bottom of the transmit buffer. the preambles are then followed by the start flag and then the data from the transmit buffer. four symbols (8 bits) are encoded at a time and then loaded into a serial shift register. the contents are shifted out onto the transmit pin clocked by the 8mhz baud clock. note that the preamble, start and stop flags, and crc value is automatically transmitted, and need not be placed in the transmit buffer. when the transmit buffer is emptied, an interrupt and/or dma service request is signalled. if new data is not supplied quickly enough, and the transmit logic attempts to take additional data from the empty buffer, one of two actions can be taken as programmed by the user. an underrun can either signal the normal completion of a frame or an unexpected termination of a frame in progress. when normal frame completion is selected and an underrun occurs, the transmit logic transmits the 32-bit crc value calculated during the transmission of all data within the frame (including the address and control bytes), followed by the stop flag to denote the end of the frame. the transmitter then continuously transmits preambles until data is once again available within the buffer. once data is available, the transmitter begins transmission of the next frame. when unexpected frame termination is selected and an underrun occurs, the transmit logic outputs an abort and interrupts the cpu. an abort continues to be transmitted until data is once again available in the transmit buffer. the fir then transmits 16 preambles, a start flag, and starts the new frame. the remote receiver may choose to ignore the abort and continue to receive data, or to signal the fir to retry transmission of the aborted frame. at the end of each frame transmitted, the fir outputs a pulse called the serial infrared interaction pulse (sip). a sip is required at least every 500ms to keep slower speed devices (115.2kbps and slower) from colliding with the higher speed transmission. the sip simulates a start bit which causes all low speed devices to stay off the bus for at least another 500ms. transmission of the sip pulse causes the transmit pin to be forced high for a duration of 1.625us and low for 7.375us (total sip period = 9.0us). after the 9.0us elapses, the preamble is then transmitted continuously to indicate to the remote receiver that the fir ? s transmitter is in the idle state. the preamble continues to be transmitted until new data is available within the transmit buffer, or the fir ? s transmitter is disabled. note that it is the responsibility of the user to ensure that a frame completes once every 500ms such that a sip pulse is produced keeping all low speed devices from interrupting transmission. because most irda compatible devices produce a sip after each frame transmitted, the user may only need to ensure that a frame is either transmitted or received by the fir every 500ms. note that frame length does not represent a significant portion of the 500ms time frame in which a sip must be produced. at 4.0mbps, the longest frame allowed is 16,568 bits, which takes just over 4ms to transmit. also note that the fir issues a sip when the transmitter is first enabled, to ensure all low speed devices are silenced before transmitting it ? s first frame. if the user disables the fir ? s transmitter during operation, transmission of the current data byte is stopped immediately, the serial shifter and transmit buffer are cleared and all clocks used by the transmit logic are automatically shut off to conserve power.
fast amba peripherals 12-47 GMS30C7201 data sheet cpu and dma register access sizes bit positioning, byte ordering, and addressing of the fir is describes in terms of little endian ordering. all fir control and status registers are 8 bits wide and are located in the least significant byte of individual words. data transfers are up to 32 bits wide. if the dma controller is used to service the transmit and/or receive buffers, the user must ensure the dma is properly configured to perform single word-wide accesses. dma burst mode access is not supported. fir register definitions the fir uses the control and data registers described in 12.3 medium and fast infrared module on page 12-17. in addition there are two status registers specific to the fir the status registers contain bits which signal crc, overrun, underrun, framing, and receiver abort errors as well as the transmit buffer service request, receive buffer service request, and end of frame conditions. each of these hardware detected events signal an interrupt request to the interrupt controller. the status registers also contain flags for transmitter busy, receiver synchronized, receive buffer not empty, and transmit buffer not full (no interrupt generated). the status registers contain bits which signal crc, overrun, underrun, framing, and receiver abort errors as well as the transmit buffer service request, receive buffer service request, and end of frame conditions. each of these hardware detected events signal an interrupt request to the interrupt controller. the status registers also contains flags for transmitter busy, receiver synchronized, receive buffer not empty, and transmit buffer not full (no interrupt generated). 12.9.1 fir status register 0 fir status register 0 (fisr0) contains bits which signal the transmit buffer service request, receive buffer service request, receiver abort, transmit buffer underrun, framing error, and the end/error in receive buffer condition. each of these hardware detected events signal an interrupt request to the interrupt controller. bits which cause an interrupt signal the interrupt request as long as the bit is set. once the bit is cleared, the interrupt is cleared. read/write bits are called status bits, read- only bits are called flags. status bits are referred to as ? sticky ? (once set by hardware, must be cleared by software). writing a one to a sticky status bit clears it, writing a zero has no effect. read-only flags are set and cleared by hardware, writes have no effect. additionally some bits which cause interrupts have corresponding mask bits in the control registers and are indicated in the section headings below. end/error in buffer status (eif) (read/write, non-maskable interrupt) the end/error in buffer status bit (eif) is set when any tag bits (32 through 36) are set in the receive buffer. when eif is set an interrupt is signalled and dma requests to empty the receive buffer are disabled until eif is cleared transmit underrun status (tur) (read/write, maskable interrupt) the transmit underrun status bit (tur) is set when the transmit logic attempts to fetch data from the transmit buffer after it has been completely emptied. when an underrun occurs, the transmitter takes one of two actions. when the transmit underrun select bit is clear (tus=0) the transmitter ends the frame by shifting out the crc which is calculated continuously on outgoing data, followed by a stop flag and sip pulse. when tus=1, the transmitter is forced to transmit an abort and continues to transmit symbols containing all zeros (0000) until valid data is again available within the buffer. once data resides within the bottom entry of the transmit buffer, a new data frame is initiated by
fast amba peripherals 12-48 GMS30C7201 data sheet transmitting sixteen preambles and a start flag followed by the transmission of data from the buffer. when the tur bit is set an interrupt request is made unless it is masked. when tus=0 the interrupt is masked, when tus=1 it is enabled. note that underruns are not generated when the fir transmitter is first enabled and is in the idle state (continuously transmits flags). receiver abort status (rab) (read/write, non-maskable interrupt) the receiver abort status bit (rab) is set when an abort is detected during receipt of an incoming frame. an abort is signalled when two or more symbols which do not contain any pulses (0000) or symbols containing 0011, 1001, 1010, or 0101(invalid symbols which are not contained within the stop flag) are detected after a valid start flag has been detected but before a complete stop flag has been received (i.e. an incorrect chip in the stop flag generates an abort as well). when an abort is received, the eof tag is set in the buffer entry which corresponds to the last piece of data which was received before the frame was aborted. the receiver then enters hunt mode, searching for the preamble. transmit buffer service request flag (tfs) (read-only, maskable interrupt) the transmit buffer service request flag (tfs) is a read-only bit which is set when the transmit buffer is not full and requires service. when the tfs bit is set, an interrupt request is made unless the transmit buffer interrupt request mask (tim) bit is cleared. the state of tfs is also sent to the dma controller, and may be used to signal a dma service request. note that tim has no effect on the generation of the dma service request. after the dma or cpu fills the buffer, the tfs flag (and the service request and/or interrupt) is automatically cleared. receive buffer service request flag (rfs) (read-only, maskable interrupt) the receive buffer service request flag (rfs) is a read-only bit which is set when the receive buffer is not empty and requires service. when the rfs bit is set, an interrupt request is made unless the receive buffer interrupt request mask (rim) bit is cleared. the state of rfs is also sent to the dma controller, and may be used to signal a dma service request. note that rim has no effect on the generation of the dma service request. after the dma or cpu fills the buffer, the rfs flag (and the service request and/or interrupt) is automatically cleared. framing error status (fre) (read/write, non-maskable interrupt) the framing error status (fre) bit is set when a frame alignment error is detected by the receive logic. a frame alignment error is detected on received data when a preamble is followed by something other than another preamble or a start flag. figure 12-14: fir status register 0 bit locations shows the bit locations corresponding to the status and flag bits within fir status register 0. note that the reset state of all writable status bits is unknown and must be cleared (by writing a one to them) before enabling the fir. also note that writes to reserved bits are ignored and reads return zeros.
fast amba peripherals 12-49 GMS30C7201 data sheet figure 12-14: fir status register 0 bit locations address: 0h80011180 fisr0 read/write & read-only bit 7 6 543210 wst 1 wst 0 fre rfs tfs rab tur eif reset0 0 ?00??? bit name description 0 eif error in buffer 0 - bits 32-36 are not set within either entry of the receive buffer 1 - one or more tag bits (32-36) are set within one or more entries of the receive buffer, request interrupt, disable receive buffer dma service requests note: once eif is cleared, receive buffer dma service requests are re-enabled 1 tur transmit buffer underrun 0 - transmit buffer has not experienced an underrun 1 - transmit logic attempted to fetch data from transmit buffer while it and the tail register were empty, interrupt request signalled if not masked (if tus=1) 2 rab receiver abort 0 - no abort has been detected for the incoming frame 1 - abort detected during receipt of incoming frame, two or more symbols containing no pulses (0000) detected on receive pin, eof bit set in receive buffer next to last piece of ? good ? data received before the abort, interrupt requested 3 tfs transmit buffer service request (read-only) 0 - transmit buffer is full or the transmitter disabled 1 - transmit buffer is not full and the transmitter is enabled. a dma service request is signalled, interrupt request is signalled if not masked (if tim=1) 4 rfs receive buffer service request (read-only) 0 - receive buffer is empty or receiver disabled 1 - receive buffer is not empty and receiver operation is enabled, dma service request signalled, interrupt request signalled if not masked (if rim=1) 5 fre framing error 0 - no framing errors encountered in the receipt of this data 1 - framing error occurred, preamble followed by something other than another preamble or start flag, request interrupt table 12-32: fir status register 0
fast amba peripherals 12-50 GMS30C7201 data sheet fir status register 1 fir status register 1 (fisr1) contains flags that indicate when the receiver is synchronized, the transmitter is active, that the transmit buffer is not full, that the receive buffer is not empty, and when an end of frame, crc error, or underrun error has occurred. all bits within fisr1 are read-only and non-interrupting. receiver synchronized flag (rsy) (read-only, non-interrupting) the receiver synchronized (rsy) flag is a read-only bit which is set when the receiver is synchronized with the incoming data stream, and is cleared when the receiver logic is in hunt mode (looking for the preamble to achieve byte and frame synchronization), or the receiver is disabled (rxe=0). this bit does not request an interrupt. transmitter busy flag (tby) (read-only, non-interrupting) the transmitter busy (tby) flag is a read-only bit which is set when the transmitter is actively transmitting a frame (address, control, data, crc, start or stop flag), and is cleared when the transmitter is idle (transmitting preambles), or the transmitter is disabled (txe=0). this bit does not request an interrupt. end of frame flag (eof) (read-only, non-interrupting) the end of frame flag (eof) is set when the last byte of data within a frame (including aborted frames) resides within the receive buffer. the receive buffer contains five tag bits (32 - 36) which are not directly readable. the 32nd bit is set at the top of the buffer whenever the last byte within a frame is moved from the receive serial shifter to the receive buffer. each time a data value is transferred to the buffer, the state of the tag bit is moved to the eof bit in the status register. whenever eof, eif is set within fisr0, an interrupt is signalled, and the receive buffer dma request is disabled. crc error status (cre) (read-only, non-interrupting) the crc error flag (cre) is set when the crc value calculated by the receive logic does not match the crc value contained within the incoming serial data stream. whenever a crc error is detected, the 33rd bit is set within the receive buffer. each time a data value is transferred to the buffer, the state of the tag bit is moved to the cre bit in the status register, indicating whether or not the frame has encountered a crc error. whenever cre is set, eif is set within fisr0, an interrupt is signalled, and the receive buffer dma request is disabled. receiver overrun status (ror) (read-only, non-interrupting) the receiver overrun flag (ror) is set when the receive logic attempts to place data into the receive buffer after it has been completely filled. 7 ? 6 wst width status 00 - all four bytes in receive buffer are valid 01 - least significant byte valid only 10 - least significant two bytes valid only 11 - least significant three bytes valid only bit name description table 12-32: fir status register 0 (continued)
fast amba peripherals 12-51 GMS30C7201 data sheet the 34th bit is set within the top entry of the receive buffer whenever an overrun occurs. each time a data value is transferred to the buffer, the state of the tag bit is moved to the ror bit in the status register, indicating that the next value in the buffer is the last ? good ? piece of data before the overflow occurred. whenever ror is set, eif is set within fisr0, an interrupt is signalled, and the receive buffer dma request is disabled. figure 12-15: fir status register 1 bits shows the location of the flags within fir status register 1. the bits within this register are read-only and do not produce interrupt requests. note that writes to bits 7,3 and 2 are ignored and reads return zero. figure 12-15: fir status register 1 bits address: 0h80011184 fisr1 read-only bit 76543210 res. ror cre eof res. res. tby rsy reset00000000 bit name description 0 rsy receiver synchronized flag (read-only) 0 - receiver is in hunt more or is disabled 1 - receiver logic is synchronized with the incoming data (no interrupt generated) 1 tby receiver synchronized flag (read-only) 0 - receiver is in hunt more or is disabled 1 - receiver logic is synchronized with the incoming data (no interrupt generated) 2 - unused 3- unused 4 eof end of frame (read-only) 0 - current frame has not completed 1 - the word in the receive buffer contains the last byte of data within the frame 5 cre crc error (read-only) 0 - no crc check errors encountered in the receipt of data 1 - crc calculated on the incoming data does not match crc value contained within the received frame 6 ror receive buffer overrun (read-only) 0 - receive buffer has not experienced an overrun 1 - receive logic attempted to place data into receive buffer while it was full, the next data value in the buffer is the last piece of ? good ? data before the buffer was overrun 7- reserved table 12-33: fir status register 1
fast amba peripherals 12-52 GMS30C7201 data sheet 12.9.2 interface register locations the ir interface module registers occupy a 4k block of addresses within the fast apb peripheral area of the arm 7201 memory map. the table below gives addresses of individual registers within that block relative to the ir interface base address, specified elsewhere. address name description 0h 80011000 irenable sir/mir/fir selector and enable register 0h 80011004 ircon ir interface control register 0h 80011008 iramv ir address match value register 0h 80011010 irdata ir transmit and receive data fifos 0h 80011014 - 0h 8001101c irdatatail ir transmit data tail register 0h 80011020 - 0h 8001107c - reserved 0h 80011080 misr0 mir status register 0 0h 80011084 misr1 mir status register 1 0h 80011088 - 0h 8001117c - reserved 0h 80011180 fisr0 fir status register 0 0h 80011184 fisr1 fir status register 1 0h 80011188 - 0h 80011fff - reserved table 12-34: ir interface block registers and their physical addresses
fast amba peripherals 12-53 GMS30C7201 data sheet 12.10universal serial bus this section describes the implementation-specific options of usb protocol for a device controller. it is assumed that the user has a knowledge of the usb standard. this usb device controller(usbd) is chapter 9(of usb specification) compliant, and supports standard device requests issued by the host. the user should refer to the universal serial bus specification revision 1.0 for a full understanding of the usb protocol and its operation. (the usb specification 1.0 can be accessed via the world wide web at: http://www.usb.org). the usbd is a universal serial bus device controller (slave, not hub or host controller) which supports three endpoints and can operate half-duplex at a baud rate of 12 mbps. endpoint 0,by default is only used to communicate control transactions to configure the usbd after it is reset or physically connected to an active usb host or hub. endpoint 0 ? s responsibilities include connection, address assignment, endpoint configuration and bus numeration. the usbd is configured by the connected host which can get a device descriptor stored in usbd ? s internal rom via endpoint 0. the usbd uses two separate 32 x 8 bit fifos to buffer receiving and transmitting data to/from the host. the fifos can be accessed by the dmac (direct memory controller), with service requests being signaled when either fifo is full/empty. the external pins dedicated to this interface are uvpo, uvp, uvmo, uvm, urcvin, nusboe and ususpend .these signals should be connected to usb transceiver such as pdiusbp11 provided by philip semiconductor. refer to data sheet pdiusbp11). the interface of the usbd and the cpu uses dmac to reduce cpu load of transferring data from external memory to usbd and from usbd to external memory. the cpu can also access the usbd using interrupt controller, by setting the control register appropriately. this section also defines the interface of usbd and cpu. the usbd uses one dedicated dma channel for receiving and transmitting data, so the dmac should be programmed into receiving channel initially for both data transferring. if transferring data to usb host occurs (setting the control register bit), that is, usb host issue in token, then dmac should be programmed to transmitting channel. after transmitting data, dmac should be programmed to the receiving channel again. 12.10.1features  full universal serial bus specification 1.0 compliance.  receiver and transceiver have 32 bytes fifo individually (this supports maximum data packet size of bulk transfer).  internal automatic fifo control logic. (according to fifo ? s status, the usbd generates dma service request signals to dmac or interrupt service request signals to the cpu)  supports high-speed usb transfer (12mbps).  there are two endpoint of transmitter and receiver respectively, totally three endpoints including endpoint 0 that has responsibility of the device configuration.  cpu can access the internal usb configuration rom storing the device descriptor for hand-held pc (hpc) by setting the predefined control register bit.  usb protocol and device enumeration is performed by internal state-machine in the usbd.  the usbd only supports bulk transfer of 4 transfer type supported by usb for data transfer.  endpoint fifo (tx, rx) has the control logic preventing fifo ? s overrun and underrun error.
fast amba peripherals 12-54 GMS30C7201 data sheet 12.10.2block diagram figure 12-16: usbd block diagram the usb, figure 12-16: usbd block diagram , comprises the serial interface engine (sie) and device interface (dev). the sie connects to the usb through a bus transceiver, and performs nrzi conversion, bit un-stuffing, crc checking, packet decoding and serial to parallel conversion of the incoming data stream. in outgoing data, it does the reverse, that is, parallel to serial of outgoing data stream and packetizing the data, crc generation, bit stuffing and nrzi generation. usb transceiver serial interface engine sie device interface dev configuration rom (device descriptor) receive fifo transmitt fifo endpoint 1 endpoint 2 amba interface apb i/f dmac request signal udci
fast amba peripherals 12-55 GMS30C7201 data sheet the dev provides the interface between the sie and the device ? s endpoint fifos, rom storing the device descriptor. the dev handles the usb protocol, interpreting the incoming tokens and packets and collecting and sending the outgoing data packets and handshakes.the endpoints fifo(rx,tx) give the information of their status (full/ empty) to the amba interface to generate dma request signal and amba i/f enable the cpu to access the fifo ? s status register and the device descriptor stored in rom. the amba interface generates a fifo read/write strobe without fifo ? s errors, based on apb signal timing. automatically it requests the dma data handling when rx fifo is full. in case of data transmitting through tx fifo (when usb generates an out token, amba i/f generates interrupt to cpu), the user should program the dmac to transmitting channel, set the transmitting enable bit in the control register. if the error of fifo (rx: overrun, tx: underrun) occurs, the amba i/f cannot generate fifo read/ write signals and dma service request signals. 12.10.3theory of operation the lgs usb core enables a designer to connect virtually any device requiring incoming or outgoing pc data to the universal serial bus. as illustrated in figure 12-16: usbd block diagram on page 12-54, the usb core comprises two parts, the sie and dev. the sie connects to the universal serial bus via a bus transceiver. the interface between the sie and the dev is a byte-oriented interface that exchanges various types of data packets between two blocks. serial interface engine the sie converts the bit-serial, nrzi encoded and bit-stuffed data stream of the usb into a byte and packet oriented data stream required by the dev. as shown in figure 12-17: lgs serial interface engine , it comprises seven blocks: digital phase lock loop, input nrzi decode and bit-unstuff, packet decoder, packet encoder, output bit stuff and nrzi encode, counters, and the crc generation & checking block. each of the blocks is described in the following sections. figure 12-17: lgs serial interface engine digital phase lock loop nrzi decode, bit unstuff output bit stuff nrzi encoder counter crc generation checking packet decoder packet encoder usb device interface
fast amba peripherals 12-56 GMS30C7201 data sheet digital phase lock loop the digital phase lock loop module takes the incoming data signals from the usb, synchronizes them to the 48mhz input clock, and then looks for usb data transitions. based on these transitions, the module creates a divide-by-4 clock called the usbclock . data is then output from this module synchronous to the usbclock . input nrzi decode and bit-unstuff the input nrzi decode and bit-unstuff module extracts the nrzi encoded data from the incoming usb data. transitions on the input serial stream indicate a 0, while no transition indicates a 1. six ones in a row cause the transmitter to insert a 0 to force a transition, therefore any detected zero bit that occurs after six ones is thrown out. packet decoder the packet decoder module receives incoming data bits and decodes them to detect packet information. it checks that the pid (packet id) is valid and was sent without error. after decoding the pid, the remainder of the packet is split into the address, endpoint, and crc5 fields, if present. the crc checker is notified to verify the data using the incoming crc5 field. if the packet is a data packet, the data is collected into bytes and passed on with an associated valid bit. table 12-35: supported pid types shows the pid types that are decoded (marked as either receive or both). at the end of the packet, either the packetok or packetnotok signal is asserted. packetnotok is asserted if any error condition arose (bad valid bit, bit-stuff, bad pid, wrong length of a field, crc error, etc.). packet encoder the packet encoder creates outgoing packets based on signals from the dev. table 12-35: supported pid types shows the pid types that can be encoded (marked as send or both). for each packet type, if the associated signal sendtype is received from the dev, the packet is created and sent. upon completion of the packet, packettypesent is asserted to inform the dev of the successful transmission. the packet encoder creates the outgoing pid, grabs the data from the dev a byte at a time, signals the crc generator to create the crc16 across the data field, and then sends the crc16 data. the serial bits are sent to the output bit stuff and nrzi encoder. pid type value send/receive out 4 ? b0001 receive in 4 ? b1001 receive sof 4 ? b1101 receive setup 4 ? b0000 receive data0 4 ? b0011 both data1 4 ? b1011 both ack 4 ? b0010 both nak 4 ? b1010 send stall 4 ? b1110 send pre 4 ? b1100 receive table 12-35: supported pid types
fast amba peripherals 12-57 GMS30C7201 data sheet output bit stuff and nrzi encoder the output bit stuff and nrzi encoder takes the outgoing serial stream from the packet encoder, inserts stuff bits (a zero is inserted after six consecutive ones), and then encodes the data using the nrzi encoding scheme (zeroes cause a transition, ones leave the output unchanged). counter block the counter block tracks the incoming data stream in order to detect the following conditions: reset, suspend, and turnaround. it also signals to the transmit logic (output nrzi and bit stuff) when the bus is idle so transmission can begin. generation and checking block the generation and checking block checks incoming crc5 and crc16 data fields, and generates crc16 across outgoing data fields. it uses the crc polynomial and remainder specified in the usb specification version 1.0. device interface the dev shown in figure 12-18: device interface works at the packet and byte level to connect a number of endpoints to the sie. it understands the usb protocol for incoming and outgoing packets, so it knows when to grab data and how to correctly respond to incoming packets. a large portion of the dev is devoted to the setup, configuration, and control features of the usb. as shown in figure 12-18: device interface the dev is divided into three blocks: device controller, device rom, and start of frame. the three blocks are described in the following sections. figure 12-18: device interface device controller ctl start of frame generation sof anchor serial interface engine dev endpoints
fast amba peripherals 12-58 GMS30C7201 data sheet device controller the device controller contains a state machine that understands the usb protocol. the (sie) provides the device controller with the type of packet, address value, endpoint value, and data stream for each incoming packet. the device controller then checks to see if the packet is targeted to the device by comparing the address/endpoint values with internal registers that were loaded with address and endpoint values during the usb enumeration process. assuming the address/endpoint is a match, the device controller then interprets the packet. data is passed on to the endpoint for all packets except setup packets, which are handled specially. data toggle bits (data0 and data1 as defined by the usb spec) are maintained by the device controller. for in data packets (device to host) the device controller sends either the maximum number of bytes in a packet or the number of bytes available from the endpoint. all packets are acknowledged as per the spec. for setup packets, the incoming data is extracted into the relevant internal fields, and then the appropriate action is carried out. table 12-36: supported setup requests lists the types of setup operations that are supported. start of frame the start of frame logic generates a pulse whenever either the incoming start of frame (sof) packet arrives or approximately 1 ms after it the last one arrived. this allows an isochronous endpoint to stay in sync even if the sof packet has been garbled. 12.10.4endpoint fifos (rx,tx) each endpoint fifo has the specific number of fifo depth according to data transfer rate. in case of maximum packet size for bulk transfer is 32 bytes that is supported in usbd. each fifo generates dataready signals (means fifo not full or fifo not empty) to amba i/f and causes amba i/f to produce dmac request signals. it contains the control logic for transferring 4 bytes at a read/write strobe generated by amba to obtain better efficiency of amba bus. setup request value supported get status 0 device, interface, endpoint clear feature 1 endpoints only set feature 3 not supported set address 5 device get descriptor 6 device set descriptor 7 not supported get configuration 8 device set configuration 9 device get interface 10 not supported set interface 11 not supported synch frame 12 not supported table 12-36: supported setup requests
fast amba peripherals 12-59 GMS30C7201 data sheet 12.10.5amba interface the amba i/f performs the decoding apb signal, generating dma request signal, comparing with endpoint fifo status signal. and it also prevents fifos overrun/ underrun error. there are 5 registers cont1,cont2,rxdata,txdata,status. the section of 1.7 describes these register fully. 12.10.6pinout the pin definitions for the lgs usb are divided into four groups: usb connections, clock connections, endpoint connections, and configuration rom connections. a diagram of the pinout is shown in figure 12-19: block diagram of the usb core pinout . figure 12-19: block diagram of the usb core pinout usb_clock usb_clock_suspended start of frame usb_reset data_packet_ok data_packet_notok endp_wr_data[7:0] usb endpoints endpn_wr endpn_wr_ready endpn_wr_stall endpn_rd_ready endpn_rd_stall endpn_rd_data[7:0] endp1_rd rcv_in vp_in vm_in vpo vmo usb_oe_n clock48 dev_rom_descriptor_index[6..0] dev_rom_setup_addr[7..0] rom_dev_setup_data[7..0] rom_en
fast amba peripherals 12-60 GMS30C7201 data sheet 12.10.7. usbd signal descriptions signals when the usbd is connected to the apb. signals when the usbd is connected to the dmac and intc (interrupt usb signals usb signals the following signals connect to a usb compatible transceiver. if the target technology includes a usb compatible pad cell, then the number of usb interface signals can be reduced to the two usb data signals d+ and d- . name type description pa[5:2] in the fast apb address signal, pd[31:0] inout the fast apb data signal pstb in the fast apb data strobe signal pwrite in the fast apb read/write signal pselusb in the fast apb select signal bres in the system reset signal (active low) bclk in the system clock pseldmausb in the fast apb usb select signal on dma access table 12-37: apb address signals name type description dreq out the dmac request signal (active high) intreq out the intc request signal (active high) table 12-38: dreq and intreq signals signal name type 1 description urcvin in receive in. this is the usb differential input signal. it comes from a differential receiver connected to usb signals d+ and d- . uvp in vplus in. this is the usb d+ signal received through a standard cmos receiver. the sie uses this signal to detect the single-ended zero (se0) bus state. uvm in vminus in. this is the usb d- signal received through a standard cmos receiver. the sie uses this signal to detect the single-ended zero (se0) bus state. table 12-39: dsb signal names
fast amba peripherals 12-61 GMS30C7201 data sheet the signal type definitions are defined here as follows: in input is a standard input-only signal out totem pole output is a standard active driver uvpo out vplus out. this pin drives the non-inverting (+) input of the differential buffer that drives the d+ / d- usb signals. uvmo out vminus out. this pin drives the inverting (-) input of the differential buffer that drives the d+ / d- usb signals. nusboe out usb output enable. when low, this pin enables the output drivers for the d+ / d- usb signals. ususpend out usb low power mode table 12-39: dsb signal names
fast amba peripherals 12-62 GMS30C7201 data sheet clock signal 12.10.8internal registers table 12-41: usb register address map summarizes the usb internal registers. cont0 (usb i/f control register0) (base address +0x00) signal name type description cclk in cclk . this pin is driven by an internal 48mhz pll. the digital phase- lock loop within sie uses this signal to capture the usb data, as well as divide it down to provide a 12mhz clock for the rest of the core and device. this signal should have a 40%-60% duty cycle, and is positive- edge sensitive. table 12-40: clock signal 48 address name description base address + 0x00 cont0 usb i/f control register 0 base address + 0x04 cont1 usb i/f control register 1 rxdata usbd receive data register txdata usbd transmit data register base address + 0x08 status usbd status register base address + 0x0c ticrxdata usbd receive data register for tic mode base address + 0x10 tictxdata usbd transmit data register for tic mode base address + 0x14 ticsel tic mode select register base address + 0x18 ticreg input tic register for tic mode base address + 0x1c ticresult output tic register for tic mode base address + 0x20 contswreset generate software reset to usbd base address + 0x24 contdrqmask dmac request masking register table 12-41: usb register address map bit76543210 reserved txen
fast amba peripherals 12-63 GMS30C7201 data sheet figure 12-20: transmit enable bit for cont0 cont1 (usb i/f control register1) (base address +0x04) figure 12-21: fifo mask bits for cont1 mfull: mask fifo full interrupt bit. when it is ? 1 ? the fifo full interrupt is masked. mempty: mask fifo empty interrupt bit.when it is ? 1 ? , the fifo empty interrupt is masked. name type description txen transmit enable bit when 1, the function of usb is transmitting data from external memory to usb host pc. when ? 0 ? , receiving data from usb host pc to external memory; default = 0. before setting this bit 1, the user should program the dmac to transmitting channel. if it is 1, amba i/f generate dmac request signal for data transmitting after checking if tx fifo ? s status is empty. table 12-42: transmit enable bit states bit7654321 0 reserved mfull mempty
fast amba peripherals 12-64 GMS30C7201 data sheet rxdata (usbd receive data register figure 12-22: usbd receive data register bits 32-bit receive data register. dmac reads 4 bytes at data read strobe. each byte is pre- sented lsb first. n is represented as rx fifo address. txdata (usbd transmit data register) figure 12-23: usbd transmit data register bits 32-bit transmit data register. dmac writes 4 bytes at data write strobe. each byte is presented lsb first. n is represented as tx fifo address. status (usbd status register) (base address + 0x08) figure 12-24: usbd status register bits full: this bit indicates that rx fifo is filled. when it is 1, automatically, amba i/f gen- erates a dmac request signal. dmac can read the rxdata register according to read strobe. empty: this bit indicates that tx fifo is empty when the the cont0 txen bit is set to 1. bit 31 ......... 24 23 ........ 16 15 ........ 8 7 ........ 0 lsb n+3 msb lsb n+2 msb lsb n+1 msb lsb n msb bit 31 ......... 24 23 ........ 16 15 ........ 8 7 ........ 0 lsb n+3 msb lsb n+2 msb lsb n+1 msb lsb n msb bit7654321 0 reserved empty full
fast amba peripherals 12-65 GMS30C7201 data sheet ticrxdata (usbd receive data register for tic mode) (base address +0x0c) figure 12-25: tic mode receive data register bits 32-bit test receive data register for tic mode. tic reads 4 bytes at data read strobe. each byte is presented lsb first. n is represented as rx fifo address. tictxdata (usbd transmit data register for tic mode) (base address +0x10) figure 12-26: tic mode transmit data register bits 32-bit transmit data register for tic mode. tic writes 4 bytes at data write strobe. each byte is presented lsb first. n is represented as tx fifo address. ticsel (the tic mode select register) (base address +0x14) figure 12-27: tic mode select register bit cpumode: cpu access mode enable bit. when cpumode = 1, the usbd is allowed to enter the cpu access mode. for dmac mode, this bit should be 0. ticen: tic mode enable bit. when ticen =1, usbd enters the tic mode. bit 31 ......... 24 23 ........ 16 15 ........ 8 7 ........ 0 lsb n+3 msb lsb n+2 msb lsb n+1 msb lsb n msb bit 31 ......... 24 23 ........ 16 15 ........ 8 7 ........ 0 lsb n+3 msb lsb n+2 msb lsb n+1 msb lsb n msb bit7654321 0 reserved cpumode ticen
fast amba peripherals 12-66 GMS30C7201 data sheet ticreg (the input tic register for tic mode) (base address+0x18) figure 12-28: input tic register for tic mode ticvmin, ticvpin, ticrcvin: this value is set to the tic vector by tic. these bits are set based on the 48mhz clock signal generated by tic. ticresult (the output tic register for tic mode) (base address+0x1c) figure 12-29: output tic register for tic mode ticusboen, ticvmo, ticvpo: the values of these bits are compared with the tic vector by tic, based on the 48mhz clock signal generated by tic. contswreset (generate software reset to usbd) (base address+0x20) figure 12-30: generate software reset to usbd eswres: this bit should be set to ? 1 ? after pmu generated 48 mhz usbd clock. if this bit is ? 1 ? , the dpll (digital pll) in the usbd is initialized and so usbd operates successfully. after data transfer has finished, the bit should be set to ? 0 ? . contdrqmask (usbd dmac request masking register) (base address+0x24) bit765432 1 0 reserved ticvmin ticvpin ticrcvin bit765432 1 0 reserved ticusboen ticvmo ticvpo bit76543210 reserved eswres
fast amba peripherals 12-67 GMS30C7201 data sheet figure 12-31: dmac request masking register in cpu access mode, the dmac request signal should be masked. mtx: mask fifo empty dmac request signal when it is ? 1 ? , fifo empty dmac request signal is masked. mrx: mask fifo full dmac request signal. when it is ? 1 ? , fifo fulldmac request signal is masked. dmac i/f this field describes the interface of the dmac and the usbd. the usbd (rx/tx buffer) transmits and receives data from and to the dmac based on the signal of the fast apb. that is, after generating the dma request signal, usbd expects the dmac to produce pseldmausb, pd, pstb and pwrite that are the fast apb signals. with these sig- nals, the fifos in rx buffer put data to pd and the fifos in tx buffer get data from pd through the quad word access. refer to the timing diagrams in 12.2.14 dma transfer flow on page 12-14. 12.10.9timing values figure 12-4: address match value field in the iramv register on page 12-22 and figure 12-5: bit locations within the ir data register on page 12-24 give details of timing values. bit7654321 0 reserved mrx mtx
fast amba peripherals 12-68 GMS30C7201 data sheet 12.11sound interface the sound control unit (soc) is an interface block to transfer sound data to external speakers. it possesses the following features:  sound playback  supports programmable sampling rate  32-bit internal data register for dma  auto dma request  8-bit resolution dac control  supports non-overlapping left/right signal for dac  supports test mode figure 12-32: sound control unit module block diagram pd pa psel pstb pwrite bnres pseldma dma interface test data direction control clock generator test mode control drq int interrupt controller dleft dright iostop sd[7:0] dac ticdac mode request reset sclk sdadr[31:0] databuf[15:0] 0 15 31 0 15 chan[1:0] dma apb interface cpg pclk (3.6864mhz) tic clk register dapulse low high
fast amba peripherals 12-69 GMS30C7201 data sheet 12.11.1hardware interface and signal description the soc module is connected to the internal apb bus. name type source/ destination description pclk in clock controller uart clock (3.6864mhz). bnres in apb bridge reset signal generated from the apb bridge. pa[4:2] in apb bridge this is the peripheral address bus, which is used by an individual peripheral for decoding register accesses to that peripheral. the addresses become valid before pstb goes high, and remain valid after pstb goes low. pd[31:0] inout apb peripherals, bd bus this is the bidirectional peripheral data bus. the data bus is driven by this block during read cycles (when pwrite is low). pstb in apb bridge this strobe signal is used to time all accesses on the peripheral bus. the falling edge of pstb is coincident with the falling edge of bclk. pwrite in apb bridge when high, this signal indicates a write to a peripheral. when low, it indicates a read from a peripheral. this signal has the same timing as the peripheral address bus. it becomes valid before pstb goes high, and remains valid after pstb goes low. psel in apb bridge when high, this signal indicates that this module has been selected by the apb bridge. this selection is a decode of the system address bus (asb). for more details, see amba peripheral bus controller (arm ddi0044). pseldma in apb bridge active high signal provided by the apb bridge to indicate soundc dma access. drq out dma when sd transfers upper 16-bit, this signal requests more sound data for the dac with active high until writing the data at sdadr. int out interrupt controller when sd transfer upper 16-bit, this signal requests more sound data for the dac with active high until writing the data at sdadr. sd[7:0] out dac dac data bus. during sclk high, it is upper 8-bit of databuf, and during low, the lower 8-bit of databuf. iostop out dac when high, analog circuits in dac go to rail-to-rail to save power dissipation. if inactive low, the analog circuit in the dac operates in normal mode. dleft out dac when high, this signal indicates that converted left data out is stable in dac. left/right signal is non-overlapping signal. dright out dac when high, this signal indicates that converted right data out is stable in dac. table 12-43: apb signal descriptions
fast amba peripherals 12-70 GMS30C7201 data sheet 12.11.2sound control unit operation the soc is an interface block used to send data to the external speaker through the internal 8-bit da converter. it can process 44.1/22.05/11.025/8khz sampled 8-bit mono or 16-bit stereo sound data. this unit has a 32-bit register to receive sound data from the cpu through dma or interrupt mode. this unit requests the dma or interrupt controller every 32-bit processing time, which depends on the sampling frequency. it has two separate signals for dac which indicate the direction of data for the stereo sound. either higher or lower byte of 16-bit stereo sound data can be played through the left or right speaker by programming the control register. during mono playback, this unit sends the same data for the left and right channels. there are two test registers. both these registers should be cleared during normal operation. ticclk port is also assigned for production test only. 12.11.3sound control unit memory map the base address of the soc is variable, and the offset of any particular register from the base address is fixed. 12.11.4sound control unit register descriptions the following registers are provided for the soc:  control register (scont)  data register (sdadr)  test output register (stor)  test input register(stir) refer to table 12-45: scontrl bit description on page 12-71, table 12-46: sdadr bit description on page 12-72, address read location write location soc base + 0x00 scont[7:0] scont soc base + 0x04 sdadr[31:0] sdadr soc base + 0x08 stor[17:0] stor soc base + 0x0c stir[14:0] soc base + 0x10 ticclk ticclk table 12-44: sound control unit register memory map
fast amba peripherals 12-71 GMS30C7201 data sheet control register (scont) note those bits marked with an asterisk should not be enabled simultaneously during normal operation. (the programmer can select only one ? either interrupt or dma mode.) bit initial value description 7 0 0-stereo 1 - mono 6* 0 dma request masking bit 0-masking 1-unmasking 5 0 this bit should be cleared to minimize power consumption when not in use. 0 - power down mode 1 - normal mode 4 0 dac operation enable/disable. during disabled, dac is in power save mode. 0 - dac disable 1 - dac enable 3 0 when cleared, lower byte data goes to left speaker. (adac [1] pin) 0 lower byte data goes to adac [1] pin 1 lower byte data goes to adac [0] pin 2 ? 12 ? b0 programmable sampling rate 00 - 11.025khz 01 - 22.05khz 10 - 44.1khz 11 - 8khz 0* 0 interrupt request masking bit 0-masking 1-unmasking table 12-45: scontrl bit description
fast amba peripherals 12-72 GMS30C7201 data sheet data register (sdadr) this register can be programmed after setting bit 5 of the scont register. test output register (stor) ? programmable register this register is used for the operation of dac. this register should only be used for dac test purposes, and should not be accessed during normal operation. bit initial value description 31 (msb) 32 ? b0 sound data this register receives data by dma controller or cpu. this unit processes the lower 16-bit data followed by the higher 16-bit data. after the lower 16-bit is processed, this unit is ready to receive new data and sends a request signal to dma controller or cpu. in mono mode, the lower byte is processed first followed by the higher byte. 30 (data) : : 1 (data) 0 (lsb) table 12-46: sdadr bit description bit initial value description 17 0 when set, ticclk is used as clock source instead of normal clock input during production test: 0 - normal mode 1 - ticclk mode 16 0 only if set, the values of bit 15 and bit 14 replace the original soundclk and dapulse signal. used only for test purposes. 0 - normal mode 1-test mode 15 0 soundclk signal input - see note 1. when bit 16 is set, this bit is meaningful. the soundclk signal is changed by the value of this bit. 14 0 dapulse signal input - see note 2. when bit 16 is set, this bit is meaningful. the dapulse signal is changed by the value of this bit. table 12-47: test output register (stor) ? programmable register
fast amba peripherals 12-73 GMS30C7201 data sheet notes (1) soundclk: this is an internal signal used as a reference clock source to play the sound data. (2) dapulse: this is an internal signal used to make the dac channel select signal. test input register (stir) ? read-only register this register is for monitoring the unit status and the signals to dac in both normal and ticdac mode. 13 0 ticdac mode for dac test. in this mode, pclk is changed by ticclk register: 0 - normal mode 1 - ticdac mode 12 0 when only ticdac mode, this bit can be programmed: 0 - interrupt not request 1 - interrupt request 11 0 when only ticdac mode, this bit can be programmed: 0 - dma not request 1 - dma request 10 0 when only ticdac mode, this bit can be programmed: 0 - dac operation run 1 - dac operation stop 9 0 when only ticdac mode, this bit can be programmed: 0-dleft low 1 - dleft high 8 0 when only ticdac mode, this bit can be programmed: 0 - dright low 1 - dright high 7 ? 0 0 sd signal. when only ticdac mode, this bit can be programmed. bit initial value description table 12-47: test output register (stor) ? programmable register (continued) bit initial value description 14 0 soundclk state. this bit indicates the state of soundclk signal. 13 0 dapulse state. this bit indicates the state of dapulse signal. 12 0 this bit is set by int signal in ticdac and normal mode: 0 - interrupt not request 1 - interrupt request 11 0 this bit is set by drq signal in ticdac and normal mode. 0 - dma not request 1 - dma request table 12-48: test input register(stir) ? read-only register
fast amba peripherals 12-74 GMS30C7201 data sheet tic clock register(ticclk) whenever this register is accessed, ticclk is generated. when stor[17] bit is set, ticclk is used as clock source instead of normal clock input. 10 0 this bit is set by iostop signal in ticdac and normal mode. 0 - dac operation run 1 - dac operation stop 9 0 this bit is set by dleft signal in ticdac and normal mode. 0-dleft low 1 - dleft high 8 0 this bit is set by dright signal in ticdac and normal mode. 0 - dright low 1 - dright high 7 ? 0 0 sd signal. this bit is set by sd signal in ticdac and nor- mal mode. bit initial value description table 12-48: test input register(stir) ? read-only register (continued)
13-1 GMS30C7201 data sheet 13.1 introduction 13-2 13.2 uart 13-3 13.3 sir 13-22 13.4 keyboard interface 13-23 13.5 gpio 13-31 13.6 interrupt controller 13-38 13.7 timers 13-42 13.8 synchronous serial interface 13-46 13.9 analog front end, afe (codec interface) 13-56 13.10 real time clock 13-64 13.11 analog ? digital converter interface controller (aic) 13-68 slow amba peripherals 13
slow amba peripherals 13-2 GMS30C7201 data sheet 13.1 introduction this chapter describes the peripherals that are connected to the 3.68mhz internal peripheral bus; these are peripherals that need relatively low data rates on the internal bus. these peripherals are not supported by the on-chip dma controller (but can be supported by 'virtual dma' ? that is, software). further details on the internal bus are included in chapter 3, architecture overview . 13.1.1 slow amba peripherals register map summary table 13-1: slow amba peripherals register map gives a summary of base addresses, names and descriptions of the slow amba peripherals. amba base address (hex) name description 2gbyte + 0x20000 u1base uart 1 2gbyte + 0x21000 u2base uart 2 2gbyte + 0x22000 kbdbase kbd 2gbyte + 0x23000 gpiobase gpio 2gbyte + 0x24000 intcbase intc 2gbyte + 0x25000 timerbase timer 2gbyte + 0x26000 spibase spi 2gbyte + 0x27000 modembase modem 2gbyte + 0x28000 rtcbase rtc 2gbyte + 0x29000 adcbase adc table 13-1: slow amba peripherals register map
slow amba peripherals 13-3 GMS30C7201 data sheet 13.2 uart 13.2.1 general description the 16c550 is a universal asynchronous receiver/transmitter (uart), with fifos, and is functionally identical to the 16450 on power-up (character mode). the 16550 can be put into an alternate mode (fifo mode) to relieve the cpu of excessive software overhead. in this mode internal fifos are activated, allowing 16 bytes plus 3 bit of error data per byte in the rcvr fifo, to be stored in both receive and transmit modes. all the logic is on the chip to minimize the system overhead and to maximize efficiency. the uart performs serial-to-parallel conversion on data characters received from a peripheral device or a modem, and parallel-to-serial conversion on data characters received from the cpu. the cpu can read the complete status of the uart at any time during the functional operation. status information reported includes the type and condition of the transfer operations being performed by the uart, as well as any error conditions (parity, overrun, framing, or break interrupt). the uart includes a programmable baud rate generator capable of dividing the timing reference clock input by divisors of 1 to 2 16 ? 1, and producing a 16x clock for driving the internal transmitter logic. provisions are also included to use this 16x clock to drive the receiver logic. the uart has complete modem-control capability, and a processor-interrupt system. interrupts can be programmed to the user ? s requirements, minimizing the computing required to handle the communications link. 13.2.2 features  capable of running all existing 16450 software.  after reset, all registers are identical to the 16450 register set.  the fifo mode transmitter and receiver are each buffered with 16 byte fifos to reduce the number of interrupts presented to the cpu.  adds or deletes standard asynchronous communication bits (start, stop and parity) to or from the serial data.  holding and shift registers in the 16450 mode eliminate the need for precise synchronization between the cpu and serial data.  independently-controlled transmit, receive, line status and data set interrupts.  programmable baud generator divides any input clock by 1 to 65535 and generates 16x clock  independent receiver clock input.  modem control functions (cts, rts, dsr, dtr, ri and dcd).  fully programmable serial-interface characteristics: - 5-, 6-, 7- or 8-bit characters - even, odd or no-parity bit generation and detection - 1-, 1.5- or 2-stop bit generation and detection - baud generation (dc to 230k baud)  false start bit detection.  complete status reporting capabilities.  line break generation and detection.  internal diagnostic capabilities: - loopback controls for communications link fault isolation  full prioritized interrupt system controls.
slow amba peripherals 13-4 GMS30C7201 data sheet 13.2.3 signal description the 16c550 uart module is connected to the internal apb bus. name type source/ destination description pclk in uart clock input this connects the main timing reference to the uart. 3.6864mhz is input clock frequency recommended. bnres in apb bridge reset signal generated from the apb bridge (master reset) when this input is low, it clears all the registers (except the receiver buffer, transmitter holding and divisor latches) and the control logic of the uart. the states of various output signals ( sout , intuart , nrts , ndtr ) are affected by an active bnres input. pa[5:2] in apb bridge register select. address signals connected to these three inputs select a uart register for the cpu to read from or write to during data transfer. a table of registers and their addresses is shown below ( table 13-6: summary of registers on page 13-10). pd[7:0] inout apb bridge data bus. this bus comprises eight tri-state input/output lines. the bus provides bi-directional communications between the uart and the cpu, data, control words and status information are transferred via the pd[7:0] data bus. pstb in apb bridge this strobe signal is used to time all accesses on the peripheral bus. the falling edge of pstb is coincident with the falling edge of bclk (asb system clock). pwrite in apb bridge when high, this signal indicates a write to a peripheral. when low, it indicates a read from a peripheral. this signal has the same timing as the peripheral address bus. it becomes valid before pstb goes high and remains valid after pstb goes low. psel in apb bridge when high, this signal indicates that this module has been selected by the apb bridge. this selection is a decode of the system address bus (asb). intuart out intc interrupt. this pin goes high whenever any one of the following interrupt types has an active high condition and is enabled via ier: receiver error flag received data available:timeout(fifo mode only) transmitter holding register empty modem status the intuart signal is reset low upon the appropriate interrupt service or a master reset operation. sin in external serial input. serial data input from the communications link (peripheral device, modem or data set). table 13-2: signal descriptions
slow amba peripherals 13-5 GMS30C7201 data sheet ncts in external clear to send. when low, this indicates that the modem or data set is ready to exchange data. the ncts signal is a modem status input whose conditions can be tested by the cpu reading bit 4 (cts) of the modem status register indicates whether the ncts input has changed state since the previous reading of the modem status register. ncts has no effect on the transmitter. note: whenever the cts bit of the modem status register changes state, an interrupt is generated if the modem status interrupt is enabled. ndsr in external data set ready. when low, this indicates that the modem or data set is ready to establish the communications link with the uart. the ndsr signal is a modem status input whose conditions can be tested by the cpu reading bit 5 (dsr) of the modem status register. bit 5 is the complement of the ndsr signal. bit 1(ddsr) of modem status register indicates whether the ndsr input has changed state since the previous reading of the modem status register. note: whenever the dsr bit of the modem status register changes state, an interrupt is generated if the modem status interrupt is enabled. ndcd in external data carrier detect. when low, indicates that the data carrier has been detected by the modem data set. the signal is a modem status input whose condition can be tested by the cpu reading bit 7 (dcd) of the modem status register. bit 7 is the complement of the signal. bit 3 (ddcd) of the modem status register indicates whether the input has changed state since the previous reading of the modem status register. ndcd has no effect on the receiver. note: whenever the dcd bit of the modem status register changes state, an interrupt is generated if the modem status interrupt is enabled. name type source/ destination description table 13-2: signal descriptions (continued)
slow amba peripherals 13-6 GMS30C7201 data sheet nri in ring signal from afe ring indicator. when low, this indicates that a telephone ring signal has been received by the modem or data set. the nri signal is a modem status input whose condition can be tested by the cpu reading bit 6 (ri) of the modem status register. bit 6 is the complement of the nri signal. bit 2 (teri) of the modem status register indicates whether the nri input signal has changed from a low to a high state since the previous reading of the modem status register. note: whenever the ri bit of the modem status register changes from a high to a low state, an interrupt is generated if the modem status interrupt is enabled. the nri input from the external pad is not provided. to use this signal, you should set up the uart control register of the afe interface. for further information, refer to 13.9 analog front end, afe (codec interface) on page 13-56. ndtr out external data terminal ready. when low, this informs the modem or data set that the uart is ready to establish communication link. the ndtr output signal can be set to an active low by programming bit 0 (dtr) of the modem control register to high level. a master reset operation sets this signal to its inactive (high) state. loop mode operation holds this signal in its inactive state. nrts out external when low, this informs the modem or data set that the uart is ready to exchange data. the nrts output signal can be set to an active low by programming bit 1 (rts) of the modem control register. a master reset operation sets this signal to its inactive (high) state. loop mode operation holds this signal in its inactive state. sout out external serial output. composite serial data output to the communications link (peripheral, modem or data set). the sout signal is set to the marking (logic 1) state upon a master reset operation. name type source/ destination description table 13-2: signal descriptions (continued)
slow amba peripherals 13-7 GMS30C7201 data sheet dlab pa[5] pa[4] pa[3] pa[2] register 0 0 0 0 0 receiver buffer (read). transmitter holding register (write). 00001interrupt enable x 0 0 1 0 interrupt identification (read) x0010fifo control (write) x 0 0 1 1 line control x0100modem control x 0 1 0 1 line status x0110modem status x 0 1 1 1 scratch 10000divisor latch (least significant byte) 1 0 0 0 1 divisor latch (most significant byte) 0 1 0 0 0 uart enable register 01100uart test input register (write-only) 0 1 1 0 1 uart test output register (read-only) 01111uart tic clock port (write-only) table 13-3: register address register/signal register control register state interrupt enable register master reset 0000 0000 interrupt identification register 0000 0001 fifo control register 0000 0000 line control register 0000 0000 modem control register 0000 0000 line status register 0110 0000 modem status register xxxx 0000 sout master reset high intuart (rcvr errs) read lsr / reset low intuart (rcvr data ready) read rbr / reset low intuart(thre) readiir / write thr / reset low table 13-4: uart reset configuration
slow amba peripherals 13-8 GMS30C7201 data sheet nrts master reset high ndtr master reset high register/signal register control register state table 13-4: uart reset configuration (continued)
slow amba peripherals 13-9 GMS30C7201 data sheet 13.2.4 internal block diagram figure 13-1: internal block diagram apb i/f & control logic baud generator transmitter timing & control transmitter fifo receiver timing & control modem control logic data bus buffer receiver buffer register receiver fifo line control register divisor latch(ls) divisor latch(ms) line status register transmitter holding register modem control register modem status register interrupt enable register interrupt id register fifo control register receiver shift register transmitter shift register select interrupt control logic select intuart pa[2] pa[3] pa[4] bnres pd[7:0] psel pwrite pstb pclk nrts ncts ndtr ndsr ndcd nri sout sin pa[5]
slow amba peripherals 13-10 GMS30C7201 data sheet 13.2.5 registers description there are two uarts implemented in the design, the base addresses are u1base and u2base. uart enable register is explained in page 13-20(test regsters of uart) . in table 13-5: uart register address map , x can be either 1 or 2. table 13-6: summary of registers gives details of the uart registers. address name description uxbase + 0x00 receiver_buffer # 8-bit r/o set dlab=0 uxbase + 0x00 transmitter_holding # 8-bit w/o set dlab=0 uxbase + 0x04 interrupt_enable # 8-bit r/w uxbase + 0x08 interrupt_identification # 8-bit r/o uxbase + 0x08 fifo_control # 8-bit w/o uxbase + 0x0c line_control # 8-bit r/w uxbase + 0x10 modem_control # 8-bit r/w uxbase + 0x14 line_status # 8-bit r/w uxbase + 0x18 modem_status # 8-bit r/w uxbase + 0x1c scratch # 8-bit r/w uxbase + 0x00 divisor_latch_ls # 8-bit r/w set dlab=1 uxbase + 0x04 divisor_latch_ms # 8-bit r/w set dlab=1 table 13-5: uart register address map register address 0 dlab=0 0 dlab=0 1 dlab=0 1 2 3 4 5 6 7 0 dlab=1 1 dlab=1 bit no. receiver buffer register (r/o) transmitter holding register (w/o) interrupt enable register interrupt ident register (r/o) fifo control register (w/o) line control register modem control register line status register modem status register scratch register divisor latch (ls) divisor latch (ms) rbr thr ier iir fcr lcr mcr lsr msr scr dll dlm 0data bit 0 (note 1) data bit 0 enable received data available interrupt 0 if interrupt pending fifo enable word length select bit 0 data terminal ready (dtr) data ready (dr) delta clear to send (dcts) bit 0bit 0bit 8 1 data bit 1 data bit 1 enable transmitter holding register empty interrupt interrupt id bit 0 rcvr fifo reset word length select bit 1 request to send (rts) overrun error (oe) delta data set ready (ddsr) bit 1 bit 1 bit 9 table 13-6: summary of registers
slow amba peripherals 13-11 GMS30C7201 data sheet notes (1) bit 0 is the least significant bit. it is the first bit serially transmitted or received. (2) these bits are always 0 in the 16450 mode. the system programmer may access any of the uart registers summarized in table 13-3: register address on page 13-7 via the cpu. these registers control uart operation including transmission and reception of data. each register bit in the table has its name and reset state shown. line control register the system programmer specifies the format of the asynchronous data communications exchange and set the divisor latch access bit via the line control register (lcr). the programmer can also read the contents of the line control register. the read capability simplifies system programming and eliminates the need for separate storage in system memory of the line characteristics. table 13-6: summary of registers on page 13-10 shows the contents of the lcr. details on each bit follow. bit 0 and 1: these two bits specify the number of bits in each transmitted and received serial character. the encoding of bits 0 and 1 is as follows: 2 data bit 2 data bit 2 enable receiver line status interrupt interrupt id bit 1 xmit fifo reset number of stop bits parity error (pe) trailing edge ring indicator (teri) bit 2bit 2bit 10 3 data bit 3 data bit 3 enable modem status interrupt interrupt id bit 2 (note 2) parity enable framing error (fe) deltas data carrier detect (ddcd) bit 3 bit 3 bit 11 4 data bit 4 data bit 4 0 0 reserved even parity select loop break interrupt (bi) clear to send (cts) bit 4bit 4bit 12 5 data bit 5 data bit 5 0 0 reserved stick parity 0 transmitter holding register empty (thre) data set ready (dsr) bit 5 bit 5 bit 13 6 data bit 6 data bit 6 0 fifo enabled (note 2) rcvr trigger (lsb) set break 0 transmitter empty (temt) ring indicator (ri) bit 6bit 6bit 14 7 data bit 7 data bit 7 0 fifo enabled (note 2) rcvr trigger (msb) divisor latch access bit 0 error in rcvr fifo (note 2) data carrier detect (dcd) bit 7 bit 7 bit 15 register address table 13-6: summary of registers (continued) bit 1 bit 0 character length 0 0 5 bits 0 1 6 bits 1 0 7 bits 1 1 8 bits table 13-7: line control register encoding
slow amba peripherals 13-12 GMS30C7201 data sheet bit 2: this bit specifies the number of stop bits transmitted and received in each serial character. if bit 2 is a logic 0, one stop bit is generated in the transmitted data. if bit 2 is a logic 1 when a 5-bit word length is selected via bits 0 and 1, one and a half stop bits are generated. if bit 2 is a logic 1 when either a 6-, 7- or 8-bit word length is selected, two stop bits are generated. the receiver checks the first stop-bit only, regardless of the number of stop bits selected. bit 3: this bit is the parity enable bit. when bit 3 is a logic 1, a parity bit is generated (transmit data) or checked (receive data) between the last data word bit and stop bit of the serial data. (the parity bit is used to produce an even or odd number of 1s when the data word bits and the parity bit are summed.) bit 4: this bit is the even parity select bit. when bit 3 is a logic 1 and bit 4 is a logic 0, an odd number of logic 1s is transmitted or checked in the data word bits and parity bit. when bit 3 is a logic 1 and bit 4 is a logic 1, an even number of logic 1s is transmitted or checked. bit 5: this bit is the stick parity bit. when bits 3, 4 and 5 are logic 1 the parity bit is transmitted and checked as a logic 0. if bits 3 and 5 are 1 and bit 4 is a logic 0 then the parity bit is transmitted and checked as a logic 1. if bit 5 is a logic 0 stick parity is disabled. bit 6: this bit is the break control bit. it causes a break condition to be transmitted to the receiving uart. when it is set to a logic 1, the serial output ( sout )is forced to the spacing (logic 0) state. the break is disabled by setting bit 6 to a logic 0. the break control bit acts only on sout and has no effect on the transmitter logic. note: this feature enables the cpu to alert a terminal in a computer communications system. if the following sequence is followed, no erroneous or extraneous characters will be transmitted because of the break. bit 7: this bit is the divisor latch access bit (dlab). it must be set high (logic 1) to access the divisor latches of the baud generator during a read or write operation. it must be set low (logic 0) to access the receiver buffer, the transmitter holding register or the interrupt enable register. programmable baud generator the uart contains a programmable baud generator that is capable of taking any clock input from dc to 8.0mhz and dividing it by any divisor from 2 to 2 16 ? 1. 4mhz is the highest input clock frequency recommended when the divisor=1. the output frequency of the baud generator is 16 x the baud [divisor # = (frequency input) / (baud rate x 16)]. two 8-bit latches store the divisor in a 16-bit binary format. these divisor latches must be loaded during initialization to ensure proper operation of the baud generator. upon loading either of the divisor latches, a 16-bit baud counter is immediately loaded. table 13-8: baud rates on page 13-13 provide decimal divisors to use with a crystal frequency of 3.6864mhz. for baud rates of 38400 and below, the error obtained is minimal. the accuracy of the desired baud rate is dependent on the crystal frequency chosen. using a divisor of zero is not recommended.
slow amba peripherals 13-13 GMS30C7201 data sheet line status register this register provides status information to the cpu concerning the data transfer. table 13-6: summary of registers on page 13-10 shows the contents of the line status register. details on each bit follow. bit 0: this bit is the receiver data ready (dr) indicator. bit 0 is set to a logic 1 whenever a complete incoming character has been received and transferred into the receiver buffer register or the fifo. bit 0 is reset to a logic 0 by reading all of the data in the receiver buffer register or the fifo. 3.6864mhz desired baud rate decimal divisor used to generate 16 x clock percent error difference between desired and actual 50 4608 - - - - 110 2094 0.026 - - - --- 300 768 - --- 1200 192 - --- - - - 2400 96 - - - - 4800 48 - - - - 9600 24 - 19200 12 - 38400 6 - 57600 4 115200 2 table 13-8: baud rates
slow amba peripherals 13-14 GMS30C7201 data sheet bit 1: this bit is the overrun error (oe) indicator. bit 1 indicates that data in the receiver buffer register was not read by the cpu before the next character was transferred into the receiver buffer register, thereby destroying the previous character. the oe indicator is set to a logic 1 upon detection of an overrun condition and reset whenever the cpu reads the contents of the line status register. if the fifo mode data continues to fill the fifo beyond the trigger level, an overrun error will occur only after the fifo is full and the next character has been completely received in the shift register. oe is indicated to the cpu as soon as it happens. the character in the shift register is overwritten, but it is not transferred to the fifo. bit 2: this bit is the parity error (pe) indicator. bit 2 indicates that the received data character does not have the correct even or odd parity, as selected by the even-parity-select bit. the pe bit is set to a logic 1 upon detection of a parity error and is reset to a logic 0 whenever the cpu reads the contents of the line status register. in the fifo mode, this error is associated with the particular character in the fifo it applies to. this error is revealed to the cpu when its associated character is at the top of the fifo. bit 3: this bit is the framing error (fe) indicator. bit 3 indicates that the received character did not have a valid stop bit. bit 3 is set to a logic 1 whenever the stop bit following the last data bit or parity bit is detected as a logic 0 bit (spacing level). the fe indicator is reset whenever the cpu reads the contents of the line status register. in the fifo mode this error is associated with the particular character in the fifo it applies to. this error is revealed to the cpu when its associated character is at the top of the fifo. the uart will try to re-synchronize after a framing error. to do this it assumes that the framing error was due to the next start bit, so it samples this ? start ? bit twice and then takes in the ? data ? . bit 4: this bit is the break interrupt (bi) indicator. bit 4 is set to a logic 1 whenever the received data input is held in the spacing (logic 0) state for longer than a full word transmission time (that is, the total time of start bit + data bits + parity + stop bits). the bi indicator is reset whenever the cpu reads the contents of the line status register. in the fifo mode this error is associated with the particular character in the fifo it applies to. this error is revealed to the cpu when its associated character is at the top of the fifo. when break occurs, only one zero character is loaded into the fifo. the next character transfer is enabled after sin goes to the marking state and receives the next valid start bit. note: bits 1 ? 4 are the error conditions that produce a receiver line status interrupt whenever any of the corresponding conditions are detected and the interrupt is enabled. bit 5: this bit is the transmitter holding register empty (thre) indicator. bit 5 indicates that the uart is ready to accept a new character for transmission. in addition, this bit causes the uart to issue an interrupt to the cpu when the transmit holding register empty interrupt enable is set high. the thre bit is set to a logic 1 when a character is transferred from the transmitter holding register into the transmitter shift register. the bit is reset to logic 0 concurrently with the loading of the transmitter holding register by the cpu. in the fifo mode this bit is set when the xmit fifo is empty; it is cleared when at least 1 byte is written to the xmit fifo.
slow amba peripherals 13-15 GMS30C7201 data sheet bit 6: this bit is the transmitter empty (temt) indicator. bit 6 is set to a logic 1 whenever the transmitter holding register (thr) and the transmitter shift register (tsr) are both empty. it is reset to a logic 0 whenever either the thr or tsr contains a data character. in the fifo mode this bit is set to one whenever the transmitter fifo and register are both empty. bit 7: in the 16450 mode this is a 0. in the fifo mode lsr7 is set when there is at least one parity error, framing error or break indication in the fifo. lsr7 is cleared when the cpu reads the lsr, if there are no subsequent errors in the fifo. note the line status register is intended for read operations only. fifo control register this is a write-only register at the same location as the iir (the iir is a read-only register). this register is used to enable the fifos, clear the fifos and set the rcvr fifo trigger level. bit 0: writing a 1 to fcr0 enables both the xmit and rcvr fifos. resetting fcr0 will clear all bytes in both fifos. when changing from fifo mode to 16c450 mode and vice versa, data is automatically cleared from the fifos. this bit must be a 1 when other fcr bits are written to or they will not be programmed. bit 1: writing a 1 to fcr1 resets its counter logic to 0. the shift register is not cleared. the 1 that is written to this bit position is self-clearing. bit 2: writing a 1 to fcr2 resets its counter logic to 0. the shift register is not cleared. the 1 that is written to this bit position is self-clearing. bit 3: fcr3 is not used. bit 4, 5: fcr4 to fcr5 are reserved for future use. bit 6, 7: fcr6 and fcr7 are used to set the trigger level for the rcvr fifo interrupt. interrupt identification register in order to provide minimum software overhead during data character transfers, the uart prioritizes interrupts into four levels and records these in the interrupt identification register. the four levels of interrupt conditions are, in order of priority:  receiver line status  received data ready  transmitter holding register empty  modem status. fcr[7:6] rcvr fifo trigger level (bytes) 00 01 (default) 01 04 10 08 11 14 table 13-9: rcvr fifo interrupt
slow amba peripherals 13-16 GMS30C7201 data sheet when the cpu accesses the iir, the uart freezes all interrupts and indicates the highest priority pending interrupt to the cpu. while this cpu access is occurring, the uart records new interrupts, but does not change its current indication until the access is complete. table 13-6: summary of registers on page 13-10 shows the contents of the iir. details on each bit are outlined below. bit 0: this bit can be used in a prioritized interrupt environment to indicate whether an interrupt is pending. when bit 0 is a logic 0, an interrupt is pending and the iir contents may be used as a pointer to the appropriate interrupt service routine. when bit 0 is a logic 1, no interrupt is pending. bit 1 and 2: these two bits of the iir are used to identify the highest priority interrupt pending as indicated in table 13-10: interrupt control functions on page 13-16. bit 3: in the 16450 mode this bit is 0. in the fifo mode, this bit is set along with bit 2 when a time-out interrupt is pending. bit 4 and 5: these two bits of the iir are always logic 0. bit 6 and 7: these two bits are set when fcr0 = 1. fifo mode only interrupt identification register interrupt set and reset functions bit 3 bit 2 bit 1 bit 0 priority level interrupt type interrupt source interrupt reset control 0001- none none - 0 1 1 0 highest receiver line status overrun error or parity error or framing error or break interrupt reading the line status register 0100secondreceiver data available receiver data available or trigger level reached reading the receiver buffer register or the fifo drops below the trigger level 1 1 0 0 second character time- out indication no characters have been removed from or input to the rcvr fifo during the last 4 character times and there is at least 1 character in it during this time reading the receiver buffer register 0010thirdtransmitter holding register empty transmitter holding register empty reading the iir register (if source of interrupt) or writing into the transmitter holding register 0 0 0 0 fourth modem status clear to send or data set ready or ring indicator or data carrier detect reading the modem status register table 13-10: interrupt control functions
slow amba peripherals 13-17 GMS30C7201 data sheet interrupt enable register this register enables the five types of uart interrupts. each interrupt can individually activate the interrupt (intuart) output signal. it is possible to totally disable the interrupt enable register (ier). similarly, setting bits of the ier register to a logic 1, enables the selected interrupt(s). disabling an interrupt prevents it from being indicated as active in the iir and from activating the intuart output signal. all other system functions operate in their normal manner, including the setting of the line status and modem status registers. table 13-6: summary of registers on page 13-10 shows the contents of the ier. details on each bit follow. bit 0: this bit enables the received data available interrupt (and time-out interrupts in the fifo mode) when set to logic 1. bit 1: this bit enables the transmitter holding register empty interrupt when set to logic 1. bit 2: this bit enables the receiver line status interrupt when set to logic 1. bit 3: this bit enables the modem status interrupt when set to logic 1. bit 4 ? 7: these four bits are always logic 0. modem control register this register controls the interface with the modem or data set (or a peripheral device emulating a modem). the contents of the modem control register are indicated in table 13-6: summary of registers on page 13-10 and are described below. bit 0: this bit controls the data terminal ready ( ndtr ) output. when bit is set to a logic 1, the ndtr output is forced to a logic 0. when bit 0 is reset to a logic 0, the ndtr output is forced to a logic 1. note: the ndtr output of the uart may be applied to an eia inverting line driver (such as the ds1488) to obtain the proper polarity input at the succeeding modem or data set. bit 1: this bit controls the request to send ( nrts ) output. bit 1 affects the nrts output in a manner identical to that described above for bit 0. bit 2: not used bit 3: not used bit 4: this bit provides a local loopback feature for diagnostic testing of the uart. when bit 4 is set to logic 1, the following occur: the transmitter serial output ( sout ) is set to the marking (logic 1) state; the receiver serial input ( sin ) is disconnected; the output of the transmitter shift register is ? looped back ? into the receiver shift register input; the four modem control inputs ( ncts , ndsr , ndcd and nri ) are disconnected; and the two modem control outputs (ndtr and nrts) are internally connected to the four modem control inputs, and the modem control output pins are forced to their inactive state (high). on the diagnostic mode, data that is transmitted is immediately received. this feature allows the processor to verify the transmit- and received-data paths of the uart. in the diagnostic mode, the receiver and transmitter interrupts are fully operational. their sources are external to the part. the modem control interrupts are also operational, but the interrupts sources are now the lower four bits of the modem control register instead of the four modem control inputs. the interrupts are still controlled by the interrupt enable register. bit 5 ? 7: these bits are permanently set to logic 0.
slow amba peripherals 13-18 GMS30C7201 data sheet modem status register this register provides the current state of the control lines from the modem (or peripheral device) to the cpu. in addition to this current-state information, four bits of the modem status register provide change information. these bits are set to a logic 1 whenever a control input from the modem change state. they are reset to logic 0 whenever the cpu reads the modem status register. the contents of the modem status register are indicated in table 13-6: summary of registers on page 13-10 and described below. bit 0: this bit is the delta clear to send (dcts) indicator. bit 0 indicates that the ncts input to the chip has changed state since the last time it was read by the cpu. bit 1: this bit is the delta data set ready (ddsr) indicator. bit 1 indicates that the ndsr input to the chip has changed state since the last time it was read by the cpu. bit 2: this bit is the trailing edge of ring indicator (teri) detector. bit 2 indicates that the nri input to the chip has changed from a low to a high state. bit 3: this bit is the delta data carrier detect (ddcd) indicator. bit 3 indicates that the ndcd input to the chip has changed state since the last time it was read by the cpu. note: whenever bit 0, 1, 2 or 3 is set to logic 1, a modem status interrupt is generated. bit 4: this bit is the complement of the clear to send ( ncts ) input. if bit 4 (loop) of the mcr is set to a 1, this bit is equivalent to rts in the mcr. bit 5: this bit is the complement of the data set ready ( ndsr ) input. if bit 4 of the mcr is set to a 1, this bit is equivalent to dtr in the mcr. bit 6: this bit is the complement of the ring indicator ( nri ) input. if bit 4 of the mcr is set to a 1, this bit is equivalent to out1 in the mcr. bit 7: this bit is the complement of the data carrier detect ( ndcd ) input. if bit 4 of the mcr is set to a 1, this bit is equivalent to out2 in the mcr. scratch register this 8-bit read/write register does not control the uart in any way. it is intended as a scratchpad register to be used by the programmer to hold data temporarily. fifo interrupt mode operation when the rcvr fifo and receiver interrupts are enabled (fcr 0 = 1, ier 0 = 1) rcvr interrupts occur as follows: 1 the received data available interrupt will be issued to the cpu when the fifo has reached its programmed trigger level. it will be cleared as soon as the fifo drops below its programmed trigger level. 2 the iir receive data available indication also occurs when the fifo trigger level is reached, and like the interrupt, it is cleared when the fifo drops below the trigger level. 3 the receiver line status interrupt (iir-06), as before, has higher priority than the received data available (iir-04) interrupt. 4 the data ready bit (lsr 0) is set as soon as a character is transferred from the shift register to the rcvr fifo. it is reset when the fifo is empty.
slow amba peripherals 13-19 GMS30C7201 data sheet when rcvr fifo and receiver interrupts are enabled, rcvr fifo time-out interrupts occurs as follows: 1 a fifo time-out interrupt occurs if the following conditions exist: - at least one character is in the fifo - the most recent serial character received was longer than four continuous character times ago (if two stop bits are programmed, the second one is included in this time delay) - the most recent cpu read of the fifo was longer than four continuous character times ago this will cause a maximum character received to interrupt issued delay of 160 ms at 300 baud with a 12-bit character. 2 character times are calculated by using the rclk input, which is the internal signal of uart for a clock signal (this makes the delay proportional to the baud rate). 3 when a time-out interrupt has occurred, it is cleared and the timer is reset when the cpu reads one character from the rcvr fifo. 4 when a time-out interrupt has not occurred the time-out timer is reset after a new character is received or after the cpu reads the rcvr fifo. when the xmit fifo and transmitter interrupts are enabled (fcr 0 = 1, ier 1 = 1), xmit interrupts occurs as follows: 1 the transmitter holding register interrupt (02) occurs when the xmit fifo is empty. it is cleared as soon as the transmitter holding register is written to (1 to 16 characters may be written to the xmit fifo while servicing this interrupt) or the iir is read. 2 the transmitter fifo empty indications will be delayed 1 character time minus the last stop bit time whenever the following occurs: thre = 1 and there has not been at least two bytes at the same time in the transmit fifo since the last thre = 1. the first transmitter interrupt affect changing fcr0 will be immediate if it is enabled. character time-out and rcvr fifo trigger level interrupts have the same priority as the current received data available interrupt; xmit fifo empty has the same priority as the current transmitter holding register empty interrupt. test registers of uart four extra registers are provided inside the uart for test purposes. they are memory mapped as shown in table 13-11: uart test registers . note these registers should only be used for test purposes, and should not be accessed during normal operation. detailed descriptions for each of the four registers now follow. registers read write width base address + 0x20 uarten uarten 1-bit base address + 0x30 uarttir 7-bit. write-only. base address + 0x34 uarttor 3-bit. read-only. base address + 0x3c uartticclk dummy address for generating tic clock. write-only. table 13-11: uart test registers
slow amba peripherals 13-20 GMS30C7201 data sheet uart enable register uart test input register this register is for programming on tir[4:0] when the tir[5] is set. bit description 0 0 = uart disable (power-down, default value), uart clock stop 1 = uart enable table 13-12: uart enable register bit description 6 this bit selects the source clock of the uart core block. 0 = the original uart clock(=3.6864mhz) 1 = tic clock whenever the tic clock port (uartticclk) is accessed, the tic clock is generated. 5 this bit selects the source of the internal nri , sin , ncts , ndsr and ndcd inputs. when it is 0, the external inputs from pads are used. when it is set, the values programmed on tir[4:0] are internally driven into the uart core block to corresponding lines. 4 programmable ndcd input when the tir[5] is set. when the tir[5] is 0 (default), the external input from pad is used (normal operation). 3 programmable ndsr input when the tir[5] is set. when the tir[5] is 0 (default), the external input from pad is used (normal operation). 2 programmable sin input when the tir[5] is set. when the tir[5] is 0 (default), the external input from pad is used (normal operation). 1 programmable sin input when the tir[5] is set. when the tir[5] is 0 (default), the external input from pad is used (normal operation). 0 programmable nri input when the tir[5] is set. when the tir[5] is 0 (default), the external input from afe i/f is used (normal operation). table 13-13: uart test input register
slow amba peripherals 13-21 GMS30C7201 data sheet uart test output register this register is for monitoring the external outputs from uart. uart tic clock port this register is the dummy register used for generating the tic clock in test mode. the tic clock source is available only after bit 6 of uart is set to 1. bit description 0 sout output line 1 nrts output line 2 ndtr output line 3 intuart output line table 13-14: uart test output register
slow amba peripherals 13-22 GMS30C7201 data sheet 13.3 sir gm30c7201 also contains a irda (infra-red data association) sir protocol encoder, which is attached to uart2, this encoder can be switched in to the tx and rx signals of uart2 so they can be used to drive an infra-red interface directly. for more details on the irda sir protocol, see the appropriate document detailing this protocol standard. if the sir protocol encoder is enabled, the uart tx line is held in the passive state and transitions of the modem status or the rx line will have no effect. section 12.4.1 gives information on enabling the irda encoder function. section 3.2 describes programming uart2.
slow amba peripherals 13-23 GMS30C7201 data sheet 13.4 keyboard interface the keyboard interface controller is an amba slave module which connects to the advanced peripheral bus (apb). for more information about amba, please refer to the amba specification (arm ihi 0001). 13.4.1 overview the keyboard interface controller unit has:  four scanning modes  8x11 matrix  11 byte key buffers  tic mode figure 13-2: keyboard interface block diagram key pad apb psel pa pd pstb pwrite intkbd pclk ticout ticin scanclk generating unit control signal generating unit scanout generating unit . . 11 x 8bit register file . . previous key value kbvr kbcr intflag compare present key value scanout scanin 11 8 8 x 11 matrix mux
slow amba peripherals 13-24 GMS30C7201 data sheet 13.4.2 hardware interface and signal description the keyboard interface controller is connected to the apb bus. 13.4.3 keyboard interface controller unit introduction the interface controller is designed to communicate with the external keyboard. the keyboard interface uses the pins scanin , scanout and all of the apb signal. it is possible to select one of four scan clock modes. name type source/ destination description pclk in uart clock uart clock. the input frequency from uart is 3.6864mhz. pclk is used to generate the scan clock. reset in apb bridge active low reset signal. pa in apb bridge this is the peripheral address bus, which is used by an individual peripheral for decoding register accesses to that peripheral. the addresses become valid before pstb goes high, and remain valid after pstb goes low. pd[31:0] inout apb bridge/ keyboard interface this is the bi-directional peripheral data bus. the data bus is driven by this block during read cycles (when pwrite is low). pstb in apb bridge this strobe signal is used to time all accesses on the peripheral bus. the falling edge of pstb is coincident with the falling edge of bclk . pwrite in apb bridge when high, this signal indicates a write to a peripheral; when low, it indicates a read from a peripheral. this signal has the same timing as the peripheral address bus. it becomes valid before pstb goes high and remains valid after pstb goes low. psel in apb bridge when high, this signal indicates that this module has been selected by the apb bridge. this selection is a decode of the system address bus (asb). for more details, see amba peripheral bus controller (arm ddi 0044). scanout out keypad this assigns the x-axis' scan line. the value is changed periodically so as to cover every key matrix. during one keyboard scan, scanout can have 11 different values. active low signal. scanin in keypad this indicates which key is pressed in the assigned scan line. active low signal. intkbd out interrupt controller interrupt signal to the interrupt controller module. this signal indicates if 11th column key scan is finished. active high signal. table 13-15: signal descriptions
slow amba peripherals 13-25 GMS30C7201 data sheet scan clock: pclk /2 1.84mhz, test mode pclk /128 28 khz pclk /256 14 khz pclk /512 7 khz scanclock is generated using pclk (3.6864mhz). programmable scan rate: 6.5k times/sec test mode scan rate 101 times/sec 50 times/sec 25 times/sec 11byte key buffer: 11 column key scan values are stored (8 x 11 key matrix). 13.4.4 keyboard interface controller unit operation to start key input scanning, set the scanen bit and powerdown bit of kbcr (keyboard configuration register) and the clksel bit of the kbcr. the key scan control signal is generated. periodically, column scan code is saved in the 11-byte key buffer. after the 11th column key data is stored, intkbd is generated to make the cpu read 11 scan values. the keyboard interface block leaves reset in power down mode. to activate the block bits [7] and [2] of the kbcr register should be programmed high, then the keyboard will be automatically scanned according to the programmed rate, and scan data will be stored in the kbvr registers. when all the keyboard has been scanned, an interrupt is generated, and, by interrogating the kbvr registers, software can determine which keys have been pressed. it is software ? s responsibility to debounce the key pressed information. keyboard key press interrupts are generated in all pmu states except deep sleep. 13.4.5 keyboard interface controller unit register map the base address of the keyboard interface controller unit is 0x80022000, and the offset of any particular register from the base address is fixed. bit address access (r/w) read location/write location 8 bit kic base + 0x00 r/w kbcr/kbcr 11 bit kic base + 0x04 r ticout 8 bit kic base + 0x08 r/w ticin/ticin 32 bit kic base + 0x0c r kbvr0 32 bit kic base + 0x10 r kbvr1 32 bit kic base + 0x14 r kbvr2 1 bit kic base + 0x18 r kbsr 0 bit kic base + 0x1c tclk this is a virtual register, used to generate tic clk in test mode. table 13-16: keyboard interface controller unit register memory map
slow amba peripherals 13-26 GMS30C7201 data sheet 13.4.6 keyboard interface controller unit register descriptions the following registers are provided for the keyboard interface controller unit. keyboard configuration register (kbcr) this is an 8-bit writable and readable register that selects scan clock mode and scan enable, and test mode, etc. the scan bit and power down bit are usually set or reset simultaneously. during a test, the scan bit and power down bit could have differing values. bit name initial value description 7 scan en 0 start and stop scanning 0=stop 1=start 6 tic en 0 tic mode 0 = disable (normal mode) 1 = enable (test mode) 5 tic clock en 0 select input clk 0 = pclk (normal mode) 1 = tclk (test mode) 4scan clock select 0 select scan clk for fast test 0 = normal scan clk 1=test mode scan clk = 1.84mhz 3 reserved 0 reserved 2 power down 0 power down 0 = power down mode, where clock is not operating 1 = normal mode, where clock is operating 1:0 clksel 0 scanning rate control 00 = 1.84mhz 01 = 28khz 10 = 14khz 11 = 7khz table 13-17: kbcr bit description
slow amba peripherals 13-27 GMS30C7201 data sheet keyboard value register (kbvr0 ? kbvr2) this is a 32-bit readable register that has a value of scanin . for example, if the value of kbvr0[32:24] is 00001100, the 5th and 6th keys are pressed and the others are released. in tic mode, the ticin value is inverted, compared and stored to the keyboard value register. tic out register (ticout) this is a test register that allows the kbd output signal to the keypad to be read back in test mode. no more than two bits can be reset, causing the interface to scan only one line during each scan period, except when the keyboard is disabled (scanen bit of kbcr=0). bit name initial value description 31:24 kbvr0 0 10st column scanin value 23:16 kbvr0 0 9nd column scanin value 15:8 kbvr0 0 8rd column scanin value 7:0 kbvr0 0 7th column scanin value 31:24 kbvr1 0 6th column scanin value 23:16 kbvr1 0 5th column scanin value 15:8 kbvr1 0 4th column scanin value 7:0 kbvr1 0 3th column scanin value 31:24 kbvr2 0 2th column scanin value 23:16 kbvr2 0 1th column scanin value 15:8 kbvr2 0 0zth column scanin value 7:0 kbvr2 0 reserved table 13-18: kbvr0 ? kbvr2 bit description bit initial value description 10 0 0 = 1st line will be scanned 1 = no scan 9 0 0 = 2nd line will be scanned 1 = no scan 8 0 0 = 3rd line will be scanned 1 = no scan 7 0 0 = 4th line will be scanned 1 = no scan table 13-19: tic out register
slow amba peripherals 13-28 GMS30C7201 data sheet 6 0 0 = 5th line will be scanned 1 = no scan 5 0 0 = 6th line will be scanned 1 = no scan 4 0 0 = 7th line will be scanned 1 = no scan 3 0 0 = 8th line will be scanned 1 = no scan 2 0 0 = 9th line will be scanned 1 = no scan 1 0 0 = 10th line will be scanned 1 = no scan 0 0 0 = 11th line will be scanned 1 = no scan value (binary number) description 011_1111_1111 1st line scanout value 101_1111_1111 2nd line scanout value 110_1111_1111 3rd line scanout value 111_0111_1111 4th line scanout value 111_1011_1111 5th line scanout value 111_1101_1111 6th line scanout value 111_1110_1111 7th line scanout value 111_1111_0111 8th line scanout value 111_1111_1011 9th line scanout value 111_1111_1101 10th line scanout value 111_1111_1110 11th line scanout value 000_0000_0000 all line scanout value (when scanen = 0) table 13-20: ticout bit description bit initial value description table 13-19: tic out register (continued)
slow amba peripherals 13-29 GMS30C7201 data sheet tic in register (ticin) 8-bit readable and writable register that is used instead of the scanin value (value from keypad) in case of tic mode. for example, 1110_1100 means 4th key, 7th key and 8th key in the current scan column are pressed. refer to table 13-21: tic in register on page 13-29. bit initial value description 7 1 indicates whether 1st key in the selected scan column is pressed: 0=pressed 1 = not pressed 6 1 indicates whether 2nd key in the selected scan column is pressed: 0=pressed 1 = not pressed 5 1 indicates whether 3rd key in the selected scan column is pressed: 0=pressed 1 = not pressed 4 1 indicates whether 4th key in the selected scan column is pressed: 0=pressed 1 = not pressed 3 1 indicates whether 5th key in the selected scan column is pressed: 0=pressed 1 = not pressed 2 1 indicates whether 6th key in the selected scan column is pressed: 0=pressed 1 = not pressed 1 1 indicates whether 7th key in the selected scan column is pressed: 0=pressed 1 = not pressed 0 1 indicates whether 8th key in the selected scan column is pressed: 0=pressed 1 = not pressed table 13-21: tic in register value (binary number) initial value description 1111_1111 1111_1110 1111_1101 : 0000_0000 present scanin value : : table 13-22: ticin bit description
slow amba peripherals 13-30 GMS30C7201 data sheet keyboard status register (kbsr) this is a 2-bit readable register that indicates whether a keyboard interrupt has occurred. the interrupt and the kbsr bit are cleared after the cpu reads kbsr. the kbsr bit is set when the key buffer is full, or when the key is pressed in powerdown mode (keyboard disabled). tclk register this register does not exist: it is used to generate tic clk in test mode. when the apb address (pa) is tclk register address and psel and pstb is high phase in test mode, tclk is high, otherwise tclk is low stage. 0000_0001 0000_0000 bit initial value description 1 (wake up) 0 wake up state: 0 = no key pressed in powerdown mode 1 = key pressed in powerdown mode 0 (interrupt state) 0 key bufferstate: 0 = key buffer is not full 1 = key buffer is full table 13-23: kbsr bit description value (binary number) initial value description table 13-22: ticin bit description
slow amba peripherals 13-31 GMS30C7201 data sheet 13.5 gpio this document describes the programmable input /output module (pio). this is an amba slave module which connects to the advanced peripheral bus (apb). for more information about amba, please refer to the amba specification (arm ihi 0001). 13.5.1 module overview the pio is an apb peripheral which provides 32 bits of programmable input/output divided into four 8-bit ports: port a, port b, port c and port d. each pin is configurable as either input or output. at system reset, all ports default to input. figure 13-3: pio block diagram and pads connections note figure 13-3: pio block diagram and pads connections shows only the configuration for 16 bits. each port has a data register and a data direction register, both 8 bits wide. the data direction register defines whether each individual pin is an input or an output. the data register is used to read the value of the pio pins ? both input and output ? as well as to set the values of pins that are configured as outputs. when the pio pin is defined as input, this input can be an interrupt source with register setting. xpb[ n ] pboe[ n ] epb[ n ] pb[ n ] apb i/f port a data reg. port port port a data b b dir. dir. reg. reg. reg. pa [ 7 : 0 ] pb[7:0] epa[7:0] epb[7:0] paoe[7:0] pboe[7:0] pd[7:0] pa[6:2] pwrite psel pstb bnres pio pa d s connection of pio lines to the external pads (connections to interrupt lines) xpa[ n ] pao e [ n ] epa[ n ] pa [ n ]
slow amba peripherals 13-32 GMS30C7201 data sheet 13.5.2 signal description the pio module is connected to the apb bus. table 13-24: signal descriptions on page 13-32 describes the apb signals used and produced. table 13-25: specific block signal descriptions on page 13-32 shows the non-amba signals from the block. name type source/ destination description bnres in reset controller this signal indicates a power-on reset status of the bus (active low). pa[6:2] in apb bridge this is part of the peripheral address bus, which is used by the peripheral for decoding its own register accesses. the addresses become valid before pstb goes high and remain valid after pstb goes low. pd[7:0] inout apb peripherals, bd bus this is part of the bidirectional peripheral data bus. the data bus is driven by this block during read cycles (when pwrite is low). pstb in apb bridge this strobe signal is used to time all accesses on the peripheral bus. the falling edge of pstb is coincident with the falling edge of bclk (asb system clock). pwrite in apb bridge when high, this signal indicates a write to a peripheral and when low, a read from a peripheral. this signal has the same timing as the peripheral address bus. it becomes valid before pstb goes high and remains valid after pstb goes low. psel in apb bridge when high, this signal indicates the pio module has been selected by the apb bridge. this selection is a decode of the system address bus (asb). for more details, see amba peripheral bus controlle r (arm ddi 0044). table 13-24: signal descriptions name type source/ destination description pa[7:0] out pads port a output driver. values written on padr register are put onto these lines and driven out to the port a pins if the corresponding data direction bits are set high (paddr register). epa[7:0] in pads port a input driver. it reflects the external state of the port. this information is obtained when reading the padr register. paoe[7:0] out pads port a output enable (active low). values written on paddr register are put onto these lines. pb[7:0] out pads port b output driver. values written on pbdr register are put onto these lines and driven out to the port b pins if the corresponding data direction bits are set low (pbddr register). table 13-25: specific block signal descriptions
slow amba peripherals 13-33 GMS30C7201 data sheet 13.5.3 functional description all pins are defined as input during reset ( bnres low). for each port there is a data register and a data direction register. on reads, the data register contains the current status of correspondent port pins, whether they are configured as input or output. writing to a data register only affects the pins that are configured as outputs. all pio input pins can be used as interrupt source with enabled interrupt mask register bit. these interrupt sources can be selected as active high/low, edge/level trigger mode. bits[5:0] of port b and bit[3:0] of port d are multiplexed with other functions and regarded as multi-function pins. in order to use these multi-function pins as pio pins, the multi-function pin selection register (pmps) bit should be set. 13.5.4 programmer ? s model pio registers the following user registers are provided: p[a,b,c,d]dr data register. values written to this 8-bit read/write register will be output on port [a,b,c,d] pins if the corresponding data direction bits are set low (port output). values read from this register reflect the external state of port [a,b,c,d] not necessarily the value written to it. all bits are cleared by a system reset. p[a,b,c,d]ddr port [a,b,c,d] data direction register. bits set in this 8-bit read/write register will select the corresponding pin in port [a,b,c,d] to become an input, clearing a bit sets the pin to output. all bits are set by a epb[7:0] in pads port b input driver. it reflects the external state of the port. this information is obtained when reading the pbdr register. pboe[7:0] out pads port b output enable (active low). values written on pbddr register are put onto these lines. pc[7:0] out pads port c output driver. values written on pcdr register are put onto these lines and driven out to the port c pins if the corresponding data direction bits are set high (pcddr register). epc[7:0] in pads port c input driver. it reflects the external state of the port. this information is obtained when reading the pcdr register. pcoe[7:0] out pads port c output enable (active low). values written on pcddr register are put onto these lines. pd[7:0] out pads port d output driver. values written on pddr register are put onto these lines and driven out to the port d pins if the corresponding data direction bits are set low (pdddr register). epd[7:0] in pads port d input driver. it reflects the external state of the port. this information is obtained when reading the pddr register. pdoe[7:0] out pads port d output enable (active low). values written on pdddr register are put onto these lines. name type source/ destination description table 13-25: specific block signal descriptions (continued)
slow amba peripherals 13-34 GMS30C7201 data sheet system reset. all pio signals can be used as interrupt sources according to the settings. each port has the following registers and interrupt signals to interrupt controller. interrupt controller receives active high, level mode interrupt sources only. but pio block can receive not only active high or active low, but also level or edge mode signals. then interprets and sends interrupt request to the interrupt controller. all bits can be controlled separately. p[a,b,c,d]im interrupt mask register. bits set in this 8-bit read/write register will select the corresponding pin to become an interrupt source. all bits are cleared by a system reset. 0 = disable interrupt (default) 1 = enable interrupt p[a,b,c,d]is interrupt status register. values in this 8-bit read-only register represents that the interrupt requests are pending on corresponding pins. all bits are cleared by a system reset. 0 = no interrupt request 1 = interrupt pending (masked interrupt is always 0) p[a,b,c,d]ie edge mode register. bits set in this 8-bit read/write register will select the corresponding pin to become an edge mode interrupt source. all bits are cleared by a system reset. 0 = level mode (default) 1 = edge mode p[a,b,c,d]ic clear register. bits set in this 8-bit write-only register will clear the stored interrupt request of corresponding bit in edge mode. all bits are automatically cleared after written. 0 = no action (default) 1 = clear interrupt source (self reset) p[a,b,c,d]ip polarity register. bits set in this 8-bit read/write register will select the corresponding pin to become an active low mode interrupt source. all bits are cleared by a system reset. after accessing this register, the edge mode register should be cleared with the clear register. 0 = active high mode 1 = active low mode ticr tic mode selection register. this 1-bit write register will select tic mode for portc[7:0] and portd[6:4]. when set, the read of pdr returns the value of the pdr register instead of external pin signals.this is for production test purposes only. it should always be clear in normal operation. pmpsb multi-function pin selection register for portb. bits set in this 6-bit read/write register will select the corresponding pin to become a pio pin.
slow amba peripherals 13-35 GMS30C7201 data sheet pmpsb value description bit 0 0 1 uvpo portb bit[0] bit 1 0 1 uvmo portb bit[1] bit 2 0 1 nusboe portb bit[2] bit 3 0 1 urtvin portb bit[3 bit 4 0 1 uvp portb bit[4] bit 5 0 1 uvm portb bit[5] table 13-26: pio multi-function pin selection for port b
slow amba peripherals 13-36 GMS30C7201 data sheet pmpsd multi-function pin selection register for portd. bits set in this 4-bit read/write register will select the corresponding pin to become a pio pin. register memory map the base address of the pio is not fixed and may be different for any particular system implementation. however, the offset of any particular register from the base address is determined. pmpsd value description bit 0 0 1 bclk portd bit[0] bit 1 0 1 nrcs3 portd bit[1] bit 2 0 1 nrcs4 portd bit[2] bit 3 0 1 nrcs5 portd bit[3 table 13-27: pio multi-function pin selection for port d address access (r/w) initial value name register description pio base + 0x00 r/w 0x00 padr port a data register pio base + 0x04 r/w 0xff paddr port a direction register pio base + 0x08 r/w 0x00 paim port a interrupt mask register pio base + 0x0c r 0x00 pais port a interrupt status register pio base + 0x10 r/w 0x00 paie port a interrupt edge mode register pio base + 0x14 w 0x00 paic port a interrupt clear register pio base + 0x18 r/w 0x00 paip port a interrupt polarity register pio base + 0x20 r/w 0x00 pbdr port b data register pio base + 0x24 r/w 0xff pbddr port b direction register pio base + 0x28 r/w 0x00 pbim port b interrupt mask register pio base + 0x2c r 0x00 pbis port b interrupt status register pio base + 0x30 r/w 0x00 pbie port b interrupt edge mode register pio base + 0x34 w 0x00 pbic port b interrupt clear register pio base + 0x38 r/w 0x00 pbip port b interrupt polarity register pio base + 0x40 r/w 0x00 pcdr port c data register table 13-28: pio register memory map
slow amba peripherals 13-37 GMS30C7201 data sheet pio base + 0x44 r/w 0xff pcddr port c direction register pio base + 0x48 r/w 0x00 pcim port c interrupt mask register pio base + 0x4c r 0x00 pcis port c interrupt status register pio base + 0x50 r/w 0x00 pcie port c interrupt edge mode register pio base + 0x54 w 0x00 pcic port c interrupt clear register pio base + 0x58 r/w 0x00 pcip port c interrupt polarity register pio base + 0x60 r/w 0x00 pddr port d data register pio base + 0x64 r/w 0xff pdddr port d direction register pio base + 0x68 r/w 0x00 pdim port d interrupt mask register pio base + 0x6c r 0x00 pdis port d interrupt status register pio base + 0x70 r/w 0x00 pdie port d interrupt edge mode register pio base + 0x74 w 0x00 pdic port d interrupt clear register pio base + 0x78 r/w 0x00 pdip port d interrupt polarity register pio base + 0x3c r/w 0x00 pmpsb multi-function pin select for port b pio base + 0x5c w 0x00 ticr tic mode selection register pio base + 0x7c r/w 0x00 pmpsd multi-function pin select for port d address access (r/w) initial value name register description table 13-28: pio register memory map (continued)
slow amba peripherals 13-38 GMS30C7201 data sheet 13.6 interrupt controller the interrupt controller has the following features:  a status register  selection of the output path (irq or fiq for each input)  enabling the interrupt the interrupt controller provides a simple software interface to the interrupt system. in an arm system, two levels of interrupt are available:  fiq (fast interrupt request) for fast, low-latency interrupt handling  irq (interrupt request) for more general interrupts ideally, in an arm system, only a single fiq source would be in use at any particular time. this provides a true low-latency interrupt, because a single source ensures that the interrupt service routine may be executed directly without the need to determine the source of the interrupt. it also reduces the interrupt latency because the extra banked registers, which are available for fiq interrupts, may be used to maximum efficiency by preventing the need for a context save. the interrupt controller provides a bit position for each different interrupt source. bit positions are defined for a software programmed interrupt. any interrupt source can be programmed as a source to fiq or irq interrupt. all interrupt source inputs must be active high and level sensitive. no hardware priority scheme nor any form of interrupt vectoring is provided, because these functions can be provided in software. any interrupt source may be masked. 13.6.1 in/out signals signal type description pd[23:0] inout data bus pa[4:2] in address bus psel in chip select pstb in strobe signal pwrite in nread/write bnres in reset signal int[23:0] in interrupt request inputs nirq out interrupt request to cpu nfiq out fast interrupt request to cpu table 13-29: interrupt controller in/out signals
slow amba peripherals 13-39 GMS30C7201 data sheet 13.6.2 interrupt control the interrupt controller provides interrupt request status, interrupt enable and interrupt direction selection registers. the enable register is used to determine whether or not an active interrupt source should generate an interrupt request to the processor. all bits are cleared by system reset. the interrupt request status indicates whether or not the interrupt source is causing a processor interrupt. the direction register is used to determine which interrupt request is generated to the cpu. if the bit is set, fiq request is activated. all bits are cleared by system reset. tic registers are used only for the production test. tic input select register is used to drive interrupt request sources by cpu. when this register is set, tic register bits is regarded as interrupt sources. this bit is cleared by system reset and should be cleared in normal operation. tic register is used as interrupt source when tic input selection register is set. bit 23 is used as a software interrupt source. when enable register bit [23] is high, an interrupt request occurs. to disable the software interrupt, enable register bit [23] should be low.
slow amba peripherals 13-40 GMS30C7201 data sheet 13.6.3 register map enable register: enable each interrupt source 0 : disable interrupt (default) 1 : enable interrupt direction register: interrupt sources will trigger nirq or nfiq 0 : activate nirq output (default) 1 : activate nfiq output status register: current interrupt request status (read-only) 0 : no interrupt request 1 : interrupt pending (masked interrupt is always "0") tic input select register: chip test purpose only. should be "0" during normal operation. 0 : normal function 1 : select tic register as interrupt sources tic register: chip test purpose only. used as interrupt sources in tic mode. should be "0" during normal operation. register address r/w initial value enable register intbase + 0x08 r/w 0x000000 direction register intbase + 0x0c r/w 0x000000 status register intbase + 0x10 r 0x000000 tic input selection register intbase + 0x18 w 0x0000 tic register as interrupt sources intbase + 0x1c w 0x000000 table 13-30: interrupt controller register map
slow amba peripherals 13-41 GMS30C7201 data sheet 13.6.4 interrupt configuration bit interrupt source 0 pmu 1dma 2 lcd 3vga 4 pcmcia 1 5 pcmcia 2 6 afe (modem codec interface) 7 aic (analog interface) 8 kbd (keyboard interface) 9timer 10 rtc 11 sound 12 usb 13 irda (mir/fir) 14 uart 1 15 uart 2 (sir) 16 spi 17 gpio port a 18 gpio port b 19 gpio port c 20 gpio port d 21 arm core (commrx: debug only) 22 arm core (commtx: debug only) 23 always high (software interrupt) table 13-31: interrupt configuration
slow amba peripherals 13-42 GMS30C7201 data sheet 13.7 timers the timer has the following features:  32-bit up ripple counter  auto repeat mode  count enable/disable  interrupt enable/disable  3-timer channel 13.7.1 in/out signals signal type description pclk in clock source pd[31:0] in/out data bus pa[6:2] in address bus psel in chip select pstb in strobe pwrite in nread/write inttimer out ? 1 ? when counter register value is equal to the base register value. bnres in reset signal table 13-32: timers in/out signals
slow amba peripherals 13-43 GMS30C7201 data sheet 13.7.2 register map base register: 32-bit target count value (interval) counter register: 32-bit up counter channel control register (timer0, timer1) bit 0 1 = start count 0 = stop count this bit clears automatically when the counter reaches the target value if it is in non-repeat mode. bit 1 1 = count repeat mode bit 2 1 = reset counter register bit[7:3] reserved address r/w initial value register timer base + 0x00 r/w 0xffffffff timer0 base register timer base + 0x08 r 0x00000000 timer0 counter register timer base + 0x10 r/w 0x00 timer0 control register timer base + 0x14 w 0x00 timer0 test register timer base + 0x20 r/w 0xffffffff timer1 base register timer base + 0x28 r 0x00000000 timer1 counter register timer base + 0x30 r/w 0x00 timer1 control register timer base + 0x34 w 0x00 timer1 test register timer base + 0x40 r/w 0xffffffff timer2 base register timer base + 0x48 r 0x00000000 timer2 counter register timer base + 0x50 r/w 0x00 timer2 control register timer base + 0x54 w 0x00 timer2 test register timer base + 0x60 r/w 0x0 top control register timer base + 0x64 r 0x0 status register timer base + 0x68 w 0x0 ticclk selection in test mode timer base + 0x7c w ticclk generation note: whenever this port is written to, it will generate ticclk pulse. table 13-33: timer port addresses
slow amba peripherals 13-44 GMS30C7201 data sheet channel control register (timer2) bit 0 1 = start count 0 = stop count bit 1 1 = count repeat mode bit 2 1 = reset counter register bit[7:3] reserved channel test register this register is for chip test purposes only. all bits should be 0 during normal operation. bit 0 ? 1 ? clock of 5th bit (bit 4) is from clock source bit 1 ? 1 ? clock of 9th bit (bit 8) is from clock source bit 2 ? 1 ? clock of 13th bit (bit 12) is from clock source bit 3 ? 1 ? clock of 17th bit (bit 16) is from clock source bit 4 ? 1 ? clock of 21st bit (bit 20) is from clock source bit 5 ? 1 ? clock of 25th bit (bit 24) is from clock source bit 6 ? 1 ? clock of 29th bit (bit 28) is from clock source bit 7 reserved top control register bit 0 timer 0 interrupt enable/disable bit 1 timer 1 interrupt enable/disable bit 2 timer 2 interrupt enable/disable 1 = interrupt enable 0 = interrupt disable. if all three bits are 0, then inttimer is always 0. bit 3 timer enable 1 = enable (normal mode) 0 = disable (lower power mode - default) bit 4 enable 64-bit counter 1 = enable. when this bit is set, the period of timer 1 is used as the clock source of timer 2. in this mode, the period of timer 2 is the product of the base register value of timer 1 and the base register value of timer 2. 0 = disable bit[7:5] reserved
slow amba peripherals 13-45 GMS30C7201 data sheet status register auto reset after read bit 0 timer 0 interrupt bit 1 timer 1 interrupt bit 2 timer 2 interrupt bit[7:3] reserved top test register production test purposes only bit 0 ticclk 1 = enable 0 = disable (normal mode) note 1 the interrupt interval in repeat mode is (base register value + 1) clock periods. for example, if the base register is set to 0x3333, then the timer generates an interrupt request every 0x3333 + 1 clock cycles. in 64bit mode, the repeat mode period is (timer1 base register value + 1) x (timer2 base register value + 1).
slow amba peripherals 13-46 GMS30C7201 data sheet 13.8 synchronous serial interface the spi is a high-speed synchronous serial port for communicating to external devices. the spi in this document is for mmc. as with any other spi device, the spi-mmc circuit consists of the following four signals:  cs host to card chip select signal  spiclk host to card clock signal  mosi host to card data signal  miso mmc to host data signal spi-mmc is byte-orientated and every command, response and data block is built with a byte (8-bit). spi-mmc messages are built from command, response and data-block tokens. all communication between cp and mmc is controlled by the cp (master). serial data transmission through spi starts when the chip-select (cs) is asserted (ie. when the cs goes to low) and ends when the chip-select is released (ie. when the cs goes to high). every mmc token transferred on the data signal is protected by crc bits. but mmc offers a non-protected mode that enables a system built with reliable data links to exclude the hardware or firmware required for implementing the crc generation and verification functions. in the non-protected mode, the crc bits of the command, response and data tokens are still required in the tokens; they are, however, defined as ? don ? t care ? for the transmitters and are ignored by the receivers. mmc is initialized in the non-protected mode. the cp can turn this option on and off using the crconoff command (cmd39). we assume that crc is processed by software. 13.8.1 input and output signals figure 13-4: block diagram of the spi-mmc on page 13-47 shows the input and output signals of the spi-mmc circuit. remember that the apb is an internal peripheral bus.
slow amba peripherals 13-47 GMS30C7201 data sheet figure 13-4: block diagram of the spi-mmc the following signals come from (or go to) the apb bus controller of the arm core. name description pa[5:2] this is part of the peripheral address bus, and is used by the peripheral for decoding its own register accesses. the addresses become valid before pstb goes high and remain valid after pstb goes low. pspisel when high, this signal indicates the spi-mmc module has been selected by the apb bridge. this selection is a decode of the system address. pd[15:0] this is part of the peripheral data bus. the data bus is driven by this block during read cycles (when pwrite is low). pstb this strobe signal is used to time all accesses on the peripheral bus. the falling edge of pstb is coincident with the falling edge of bclk . table 13-34: signal description apb interface tx buffer rx buffer pstb(txwclk) txdatain fiforeset txempty txfull pstb(rxrclk) rxdatain fiforeset rxempty rxfull txdataout pselspi pa pd pwrite pstb bres1 pclk xchcounter txrclk rxwclk tx shift reg rx shift reg mosi miso delayclk xchdone spiirq rxdatain spicr spiclk clocken
slow amba peripherals 13-48 GMS30C7201 data sheet the spi-mmc has four signals connected to the external mmc:  cs - chip select signal for external mmc  spiclk - serial clock signal to the external mmc  mosi - serial data output signal to the external mmc  miso - serial data in signal from the external mmc 13.8.2 overall structure and operation a block diagram of the spi-mmc is shown in figure 13-5: spi-mmc block diagram overview . figure 13-5: spi-mmc block diagram overview the tx fifo and rx fifo in figure 13-5: spi-mmc block diagram overview are fifo buffers. in the current design, it is assumed that each buffer contains eight entries, where each entry is 8-bit wide. after cp writes a sequence of data to the tx fifo, the content of the fifo is loaded into the tx shift register and is shifted out serially one byte at a time. when all elements in the tx fifo are transferred to the tx shift register, the spi-mmc issues an interrupt to cp, which may fill the tx fifo for further data transfer. pwrite when high, this signal indicates a write to a peripheral, and when low, a read from a peripheral. this signal has the same timing as the peripheral address bus. it becomes valid before pstb goes high and remains valid after pstb goes low. bnres reset signal (active low) spiirq this signal goes to high if this interrupt is enabled and if either the tx or rx operation is completed. pclk this input clock signal has the frequency of 3.6864mhz name description table 13-34: signal description (continued) tx data buffer rx data buffer tx shift register rx shift register timing & control block counters cp(apb) pclk mosi miso spiclk cs
slow amba peripherals 13-49 GMS30C7201 data sheet serial input data is shifted into the rx shift register. after 8 bits are shifted in, the content of the rx shift register is copied into the rx fifo. when the rx fifo is full, the spi-mmc issues an interrupt to cp through the spiirq signal. cp reads the content of the rx fifo in an interrupt service routine. the timing and control block produces all necessary control signals of the spi-mmc block including spiclk . the frequency of spiclk signal is programmable. spi-mmc transfer ? s protocol is command and response. whenever cp sends a command to mmc (via spi), mmc sends cp (via spi) a response. the response is variable length for command ? for example, there is 1-, 6-, 17-byte. there is only 6 byte in command. consider the sequence of operations that occur in a read transfer. 1 cp send a reset signal to the spi-mmc block. in other word, cp write ? 0 ? to bit in the resetreg register. the signal is used to clear counters inside the block.before new exchange begins and the content of xchcounter is changed, and transmit mode is changed (xchmode bit in the spicr), cp must send a reset signal to the spi-mmc block. 2 first, cp set up the spicr register. in this example, xchmode is send mode. 3 cp write number to send into xchcounter register. 4cp write ? data read command(cmd17) ? into the tx fifo. 5 cp asserts cs signal. in other words, cp write 0 to cs bit in the spicr. 6 cp send a start signal to spi-mmc. in other word, cp set xch bit in the spicr. 7 the spi-mmc block sends out 6 byte of command data from tx fifo through tx shift register. 8 the spi-mmc block issues the interrupt after it send all data in tx fifo. 9 the cp reads the spisr register in the spi-mmc block and disable start signal (reset xch bit). in other words, cp writes the spicr register. 10 cp send a reset signal to the spi-mmc block. in other word, cp write 0 to bit in the resetreg register. the signal is used to clear counters inside the block. before new exchange begins and the content of xchcounter is changed, and transmit mode is changed (xchmode bit in the spicr), cp must send a reset signal to the spi-mmc block. 11 cp changes transmit mode.(xchmode is receive mode) 12 the cp write number to be received into xchcounter register. 13 cp send a start signal to spi-mmc (set xch bit). 14 then spi-mmc block receives response from mmc. 15 after spi-mmc receives 1 byte (for cmd17 command), it sets xch done status bits and it issues interrupt to a cp. 16 the cp reads the spisr register in the spi-mmc block and disable start signal (reset xch bit). in other words, cp writes the spicr register. 17 the cp read data rx fifo. 18 after cp takes this response data and examine it, cp act as response data.if there is no error indication in response, cp informs spi-mmc block that mmc sends data to it. 19 cp sends a reset signal to the spi-mmc block. in other words, cp write 0 to bit in the reset register. the signal is used to clear counters inside the block. before new exchange begins and the content of xchcounter is changed, and transmit mode is changed (xchmode bit in the spicr), cp must send a reset signal to the spi-mmc block. 20 the cp write number to be received into xchcounter register. 21 cp send a start signal to spi-mmc (set xch bit).
slow amba peripherals 13-50 GMS30C7201 data sheet 22 the spi-mmc block receives data from mmc (for example, data length is from 4 byte to 515 byte.) 23 if spi-mmc receives data like rx fifo size, spi-mmc block sets the ? rx fifo full ? status bit and issues an interrupt to cp.at this time spiclk disable start signal for prevention of rx fifo overrun.if cp takes all data in rx fifo, cp sends a start signal a and receives response to remain. repeat it. 24 after spi-mmc block receive all data from mmc, it sets the xch done status bit and issues an interrupt to cp. 25 the cp reads the spisr register in the spi-mmc block and disable start signal (reset xch bit). in other words, cp writes the spicr register. 26 after cp take last data from rx fifo, cp de-asserts cs signal. 13.8.3 register map table 13-35: spi-mmc block register map shows a register map of the spi-mmc block. spicr register data rate these bits select the baud rate of the spiclk based on divisions of the system clock. the master clock for the spimmc is pclk .the bits are encoded as: 0=bypass 1 = divide by 2 offset register name type value in reset description 0x00 spicr r/w 0100000 spi control register 0x04 spisr r 00000000 spi status register 0x08 xchcounter r/w 00000000000 number of exchange data 0x0c txdatabuffer w tx data buffer (8*8 bits) 0x10 rxdatabuffer r rx data buffer (8*8 bits) 0x14 testregister1 r 000000000 spi test register1 0x18 testregister2 r 000000000 spi test register2 0x1c resetreg r/w 0 ? spi reset register 0x20 dummy r does not exist test clock generation 0x24 tic r tic register table 13-35: spi-mmc block register map 6543210 data rate cs xchmode testmode loop spien xch
slow amba peripherals 13-51 GMS30C7201 data sheet cs this bit is chip select signal. in order to communicate external device(mmc), cp asserts 0 in this bit. 0 = when cp can exchange data with external device (mmc) 1 = when cp cannot exchange data with external device (mmc) xchmode this bit determines the direction of transfer 0 = when cp have valid data to send to mmc (send mode) 1 = when cp have valid data to receive from mmc (receive mode) testmode when testmode bit is set, spi-mmc block is in tic mode. when tic mode, the operation of the spi-mmc is same in normal mode except that clock source is not pclk but tclk which is made in the block. 0 = normal operation 1 = the spi-mmc block is in tic mode loop when set, this bit selects the local loopback operation. the transmitter output is internally connected to the receiver input. when in loopback mode, the operation of spi-mmc block is same in normal mode except miso is internally connected mosi. 0 = normal operation 1 = the spi-mmc block is in loopback mode spien this bit enables the spimmc. the enable should be asserted before initiating an exchange and should be negated after the exchange is complete. when the spien bit is cleared, consumes minimal power. 0 = spi master disable 1 = spi master enable xch this bit triggers the state machine to generate clocks at the selected bit rate. 1 = initiate exchange 0 = no exchange occurs spisr register tx empty this bit is set when tx data buffer is empty. if tx empty goes high, a serial peripheral interrupt is generated. clearing the tx empty bit is accomplished by reading the spisr. xchdone this bit is set when exchange is completed between cp and mmc. if xchdone bit goes high, a serial peripheral interrupt is generated. clearing the xchdone bit is accomplished by reading the spisr. 7654 0 tx empty xchdone rx full reserved
slow amba peripherals 13-52 GMS30C7201 data sheet rx full this bit is set when rx data buffer is full. if rx full bit goes high, a serial peripheral interrupt is generated. clearing the rx full bit is accomplished by reading the spisr. xchcounter register xchcounter number of bytes to be exchanged between cp and spi. txdatabuffer register this 8-bit register is an entry point of the tx fifo. when cp writes an 8-bit data to this register, the spi-mmc block shifts the content of the tx fifo and appends the new data to the fifo. rxdatabuffer register this register is the access point of the rx fifo. when cp reads one data item from this register, the spi-mmc block shifts the rx fifo so that the next data item becomes available at this location. test register1 one bit data from miso pin shifts in testregister1 when spiclk is rising. test register2 one bit data from mosi pin shifts in testregister2 when spiclk is rising. resetreg reset when cp writes 0 to this location, all registers and counters of the spi-mmc block are cleared. tclk register when this register is read or written in the tic mode, tclk is generated. 9 0 xchcounter 70 te s t r e g i s t e r 1 70 te s t r e g i s t e r 2 0 resetreg
slow amba peripherals 13-53 GMS30C7201 data sheet tic register this test register allows the spimmc output signal to the mmc to be read back. 13.8.4 signal timing all timing diagrams use the following schematics and abbreviations. all timing values are defined as outlined below. command/response host command to card response: card is ready 10 spiclk cs name description h signal is high (logical ? 1 ? ) l signal is low (logical ? 0 ? ) x don ? t care z high impedance state * repeater busy busy token command command token response response token data block data token table 13-36: timing diagram abbreviations l h h l l *********************************** l l h h h h h h h h ************ h h x x x h 6bytes command h h h h h h h h z z h h response h h z z h ******* h h h h h h z h h cs mosi miso <-n cs -> <-n cr ->
slow amba peripherals 13-54 GMS30C7201 data sheet host command to card response: card is busy card response to host command: data read data write l h h l l *********************************** l l h h h h h h h h ************ h h x x x h 6bytes command h h h h h h h h z z h h response * h h z z h ******* h h h h l z h l cs mosi miso <--n cs --> <-n cr -> busy busy l l l l l *********************************** l l h h h h h h h h ******************** h h x x x h 6bytes command h h h h h h h h h h *********** h h z z response h h h h h h h h cs mosi miso <-n rc -> l h h l l *********************************** l l h h h h h h h h ************ h h x x x h read command h h h h h h h h z z h h response data block h z z z h h h h h h z h h cs mosi miso <--n cs --> <-n cr -> h h h h <-n ac -> l h h l l *********************************** l h h h h h h h h *** h ****** h h write command h h h h h h h h z z h h response ****** busy z z h h h h h h z h h cs mosi miso <--n cs --> <-n cr -> h h h h <--n wr --> data block data resp . h x x x
slow amba peripherals 13-55 GMS30C7201 data sheet timing constants definitions figure 13-6: input and output timing diagram name minimum maximum unit n cs 0 - 8 clock cycles n cr 1 2 8 clock cycles n rc 1 - 8 clock cycles n ac 1 8 clock cycles n wr 1 - 8 clock cycles table 13-37: timing constants definitions mosi spiclk miso
slow amba peripherals 13-56 GMS30C7201 data sheet 13.9 analog front end, afe (codec interface) 13.9.1 module overview the analog front end (afe) interface is an apb peripheral which allows direct connection to a telephony-type codec. it provides all the necessary clocks and timing pulses, and also performs the parallel-to-serial conversion on output data and serial-to- parallel conversion on input data. the interface is full duplex, and contains two separate data fifos. figure 13-7: signal connections of the afe interface data is transferred to or from the codec at 56kb per second. the data is either written to, or read from, the appropriate 32-byte fifo. an interrupt is generated when the fifo is empty, when an error occurs or when the ringing signal is detected. 13.9.2 signal description the afe interface module is connected to the apb. table 13-38: signal descriptions describes the relevant apb signals. table 13-39: specific block signal descriptions on page 13-57 shows the non-amba signals from the block. apb interface codec interface codec (gm0815) sclk sdfs sdi ncon sdo rly ring bnres intafe psel pwrite pstb pa[3:2] pd[15:0] name type source/ destination description bnres in reset controller this signal indicates system reset status of the bus (active low). pa[6:2] in apb bridge this is part of the peripheral address bus, which is used by the peripheral for decoding its own register accesses. the addresses become valid before pstb goes high and remain valid after pstb goes low. table 13-38: signal descriptions
slow amba peripherals 13-57 GMS30C7201 data sheet pd[31:0] inout apb peripherals, bd this is part of the bidirectional peripheral data bus. the data bus is driven by this block during read cycles (when pwrite is low). pstb in apb bridge this strobe signal is used to time all accesses on the peripheral bus. the falling edge of pstb is coincident with the falling edge of bclk (asb system clock). pwrite in apb bridge when high, this signal indicates a write to a peripheral, and when low, a read from a peripheral. this signal has the same timing as the peripheral address bus. it becomes valid before pstb goes high and remains valid after pstb goes low. psel in apb bridge when high, this signal indicates the afe module has been selected by the apb bridge. this selection is a decode of the system address bus (asb). for more details see amba peripheral bus controller (arm ddi 0044). uartring out uart ring detect signal to uart. name type source/ destination description table 13-38: signal descriptions name type source/ destination description ncon out codec serial control/data input select (control at low). ring in daa ringing signal input. rly out daa relay control output. sdi in codec serial data input/ control data input. sdo out codec serial data output. active when tren bit is set, otherwise held low. sdfs in codec serial data frame synchronous signal input. sclk in codec serial data clock input at a frequency of 864khz. intafe out interrupt controller afe interrupt. active high. table 13-39: specific block signal descriptions
slow amba peripherals 13-58 GMS30C7201 data sheet 13.9.3 functional description the afe interface is a serial-to-parallel and parallel-to-serial converter providing full duplex transmission with an external serial afe(codec). two 32-byte fifos are provided to help optimize processor usage. data is clocked in and out of the block with the sclk signal which runs at 864khz. figure 13-8: afe interface block diagram transmit and receive modes are enabled by asserting tren bit in the control register. when asserted, the fifo is enabled. additionally, if the tren bit is cleared, the sdo output is disabled. asserting the enable bit causes the interrupt generation logic to become active, otherwise it is disabled. data is loaded into the transmit fifo by writing to the txdr register. at the beginning of a transmit cycle, this data is loaded into a shift register where it is shifted out serially to sdo, msb first, according to the codec protocol mode (see figure 13-9: codec protocol diagram on page 13-59). data is received by taking data in serially through sdi, again msb first, shifting it through the shift register and loading the complete half-word into the receive fifo when a half-word has been received. the status register is provided to indicate the status of the fifos, whether an interrupt occurred, and whether an error occurred. codec interface rfifo rxsr rxdr (9x32 rx block tfifo txsr txdr (9x32 tx block control block cr sr sdi sdfs sdo sclk ring rly ncon
slow amba peripherals 13-59 GMS30C7201 data sheet figure 13-9: codec protocol diagram interrupts the afe interface has three interrupt sources that assert an active high interrupt. these interrupts are unmasked by setting the enable bits in the cr to 1. 13.9.4 programmer ? s model afe registers the following user registers are provided:  transmit data register (txdr)  receive data register (rxdr)  reference value register (rvr)  control register (cr)  status register (sr) txdr (transmit data register) is a 32-bit write-only register, in which transmit data is stored. writes to this register will push the data into the transmit fifo. all the bits in this register are initialized to 0 at reset. sclk sdfs data control msb msb-1 lsb c1 c0 r xpd 14 15 0 interrupt source issuance condition method to clear interrupt txfei transmit-fifo empty after read sr ringi ring input is high after read sr fifoerrori fifo error (no data to send) after read sr table 13-40: interrupt sources bit name function 31:0 data transmit data table 13-41: txdr bit functions
slow amba peripherals 13-60 GMS30C7201 data sheet rxdr (receive data register) is a 32-bit read-only register, in which receive data is stored. reads from this register will give the data stored in the receive fifo. all the bits in this register are initialized to 0 at reset. cr (control register) is an 8-bit read/write register, which is used to control the afe interface. all the bits in this register are initialized to 0 at reset. bit name function 31:0 data receive data table 13-42: rxdr bit functions bit name function 7 pwdn power down mode 0 : power down mode (initial value) stops codec signals (sclk, sdfs) 1 : normal mode 6 loop internal loopback mode 0 : normal mode (initial value) 1 : loopback mode 5 tren transmit /receive enable 0 : disable 1 : enable 4 scds serial control/ data output select 0 : serial data output (initial value) 1 : serial control output 3 rlyen rly output value 0 : rly set low 1 : rly set high 2 nringim ring interrupt enable 0 : interrupt disable 1 : interrupt enable 1 ntxrxim fifo empty interrupt enable 0 : interrupt disable 1 : interrupt enable 0 nfeim fifo error interrupt enable 0 : interrupt disable 1 : interrupt enable table 13-43: cr bit functions
slow amba peripherals 13-61 GMS30C7201 data sheet rvr (reference value register) is an 11-bit read-only register which is used to indicate the value of ring input, the difference of read pointer position from write pointer position in the fifo for transmit/receive. sr (status register) is a 3-bit read-only register which is used to indicate the status of the afe interface. these bits show the interrupt sources regardless of interrupt disable. uartcr (uart control register) is a 1-bit read/write register, which controls ring signal to uart block. bit name function 10 uartring this bit shows the state of the ring signal to the uart block. 9 txfifofull when the transmit fifo is full, this bit is set. when fifo is full, txposi and rxposi values are zero. 8 ringiv ring input value 7:4 txpd difference of read/write pointer for tx fifo (bits 3:0) 3:0 rxpd difference of read/write pointer for rx fifo (bits 3:0) table 13-44: rvr bit functions bit name function 2 ringi ring interrupt 0 : no interrupt detected (initial value) 1 : interrupt occurred 1 fempty fifo empty (active high) interrupt 0 : no interrupt detected (initial value) 1 : interrupt occurred 0 txr tx error (active high) interrupt 0 : no interrupt detected (initial value) 1 : interrupt occurred table 13-45: sr bit functions bit name function 0 ringen enable ring to uart 0 : ring signal is connected to uart nri 1 : disable mode (initial value) in this mode, ring signal to uart is always high. table 13-46: uartcr bit functions
slow amba peripherals 13-62 GMS30C7201 data sheet tir (test register for input) is a 5-bit write-only register defined for test purposes. this register allows simulation of input signals to the block, as well as the generation of a special test clock signal for use with production test vectors. tor (test register for output) is a 3-bit read-only register defined for test purposes. this register allows simulation of input signals to the block, as well as the generation of a special test clock signal for use with production test vectors. register memory map the base address of the afe interface is selectable by software. the offset of any particular register from the base address is shown below. note: the asterisk denotes that access to any address in the range produces the same result. bit name function 4 tnflag mode select bit 0 : normal operation mode 1 : test mode 3 tsclk programmable serial clock for test 2 tsdfs programmable data frame sync. for test 1 tsdi programmable serial data input for test 0 tring programmable ring input for test table 13-47: tir bit functions bit name function 2 tsdo serial data output line 1 tncon serial control/data input select output line 0 trly relay control output line table 13-48: tor bit functions address register read location write location afe base cr control register control register afe base + 0x04 sr status register afe base + 0x08 rvr reference value register afe base + 0x0c uartcr uart control register uart control register afe base + 0x10 tir tir afe base + 0x14 tor tor *afe base + 0x20 ? 0x3c tx transmit data register *afe base + 0x40 ? 0x5c rx receive data register table 13-49: afe interface register memory map
slow amba peripherals 13-63 GMS30C7201 data sheet communication procedure the modem codec (gm0815) can receive normal data or codec control data with an ncon pin. procedures 1 ? 3 below are for sending codec control data to gm0815. if there is no control data, procedures 1 to 3 are not necessary. procedures 4 to 8 are for sending/receiving normal data to/from gm0815. this peripheral shares one interrupt request for both directions (ie. transmit/receive) of data transfer, so outgoing and incoming data should be synchronized for fifo fill and empty. 1 in order to send control data to the external modem codec, program the control register to drive ncon output pin to low and enable afe. 2 send control data by writing two words to the transmit fifo. these four half words have the same data to synchronize timing with codec. 3 when there is an interrupt request which indicates that fifo needs to be filled, then drive ncon pin high, which represents that afe is in normal data transfer mode. normally ncon pin should be high. 4 disable afe to initialize fifo. 5 to transmit and receive data, enable afe (ncon pin should stay high). 6 write the outgoing data to the transmit fifo. there will be no interrupt for the first data request. the data size should be 1 + burst size of words (32 bit). if software requires an eight-word burst, then it should write nine words first. then write/read eight words to/from transmit/receive fifo on each interrupt. the burst size can be selected from one to eight words. 7 for each fifo fill interrupt request, write outgoing data and then read the incoming data. fifo over-/underrun error is checked only by transmit part, and incoming data has more latency than outgoing data. 8 interrupt should be serviced before one word (two data) transmit time. 9 the last word cannot be transmitted if afe is disabled before completing a transfer. to confirm it, include one filler word as the last one and wait until fifo fill interrupt request is generated. if there is a fifo error, software should disable afe to initialize fifo again.
slow amba peripherals 13-64 GMS30C7201 data sheet 13.10real time clock 13.10.1module overview this module is a 32-bit counter clocked by a 32768hz clock. this clock needs to be provided by the system, as there is no oscillator inside the block. the clock is divided in the rtc core to provide a 1hz clock which is used to drive a 32-bit counter which forms the real time clock (rtc). it also contains a 32-bit match register which can be programmed to generate an interrupt signal when the time in the rtc matches the specific value written to this register (alarm function - rtc event). the rtc has two event outputs, one which is synchronized to pclk, srtcev, and the second, urtcev synchronized to the 32768hz clock. srtcev is to be connected to the system interrupt controller, and urtcev is used in the pmu to provide a system alarm wakeup. figure 13-10: real time clock connections diagram pa[4:2] pd[31:0] psel pwrite pstb srtcev apb interface rtc core (counter + registers) from/to apb from xtal oscillator interrupt controller clk32768hz urtcev unsynchronized interrupt synchronized event output to pclk npor
slow amba peripherals 13-65 GMS30C7201 data sheet 13.10.2signal description the rtc module is connected to the apb. table 13-50: apb signal descriptions describes the apb signals used and produced. table 13-51: specific block signal descriptions shows the non-amba signals from the block. name type source/ destination description npor in external power on reset. pa[4:2] in apb bridge this is part of the peripheral address bus, which is used by this peripheral for decoding its own register accesses. the addresses become valid before pstb goes high and remain valid after pstb goes low. pd[31:0] inout apb peripherals, bd bus this is the bidirectional peripheral data bus. the data bus is driven by this block during read cycles (when pwrite is low). pstb in apb bridge this strobe signal is used to time all accesses on the peripheral bus. the falling edge of pstb is coincident with the falling edge of bclk (asb system clock). pwrite in apb bridge when high, this signal indicates a write to a peripheral and when low, a read from a peripheral. this signal has the same timing as the peripheral address bus. it becomes valid before pstb goes high and remains valid after pstb goes low. psel in apb bridge when high, this signal indicates the rtc module has been selected by the apb bridge. this selection is a decode of the system address bus (asb). for more details, see amba peripheral bus controlle r (arm ddi 0044). pclk in apb clock gen the slow apb clock used to re-synchronize data transfers between the 32768hz clock and the apb. table 13-50: apb signal descriptions name type source/ destination description clk32khz in clock generator 32768hz clock input. this is the signal that clocks the counter during normal operation. srtcev out apb peripheral (interrupt controller) interrupt signal to the interrupt module. when high, this signal indicates a valid comparison between the counter value and the match register. it also indicates 1hz interval with enable bit in control register. urtcev out apb peripheral when high, this signal indicates a valid comparison between the counter value and the match register. this signal is used to wake up the gm30c7201 when it is asleep. clk4k out apb peripheral this signal is used in the power management block. table 13-51: specific block signal descriptions
slow amba peripherals 13-66 GMS30C7201 data sheet 13.10.3functional description the counter is loaded by writing to the rtc data register. the counter will count up on each rising edge of the clock and loops back to 0 when the maximum value (0xffffffff) is reached. at any moment the counter value can be obtained by reading the rtc data register. the value of the match register can also be read at any time, and the read does not affect the counter value. the status of the interrupt signal is available in the status register. the status bit is set if a comparator match event has occurred or 1 second has elapsed. reading from the status register will clear the status register. figure 13-11: rtc block diagram 13.10.4programmer ? s model rtc registers the following user registers are provided: module core registers 32-bit comparator urtcev a p b b u s match register data in clk32768hz interface to apb ripple counter rtc apb sync control data out rtc counter 1hz pclk srtcev register name type description rtcdr rtc data register read/write writing to this 32-bit register will load the counter. a read will give the current value of the counter. rtcmr rtc match register read/write writing to this 32-bit register will load the match register. this value can also be read back. table 13-52: rtc register description
slow amba peripherals 13-67 GMS30C7201 data sheet register memory map the base address of the rtc is not fixed and may be different for any particular system implementation. the offset, however, of any particular register from the base address is determined. note the rtc clock divider register may only be written to when in test mode. rtcs rtc status read-only when performing a read from this location the interrupt flag will be cleared. if a match event has occurred, bit[1] will be set. for a second event, bit[0] will be set. this register is affected by the control register. rtcdv rtc clock divider read/write reads to the register will return only four bits of the clock divider output. bits [3:0] will return bits (14,11, 7, 3) of the divider output. write zero to bit[0] clears this divider. rtccr rtc control read/write this register enables the interrupt. bit[1] enables the match event interrupt (default disable = 0). bit[0] enables second event interrupt (default disable = 0). rtcts rtc tic selection write-only this register is for production test purposes. bit[0] enables ticclk32k for 32khz clock replacement. bit[1] enables ticclkpclk for pclk clock replacement. ticclk32k write-only this generates 32khz clock for production test purposes. ticclkpclk write-only this generates pclk clock for production test purposes. register name type description table 13-52: rtc register description (continued) address read location write location rtc base rtc data register (rtcdr) rtc data register (rtcdr) rtc base + 0x04 rtc match register (rtcmr) rtc match register (rtcmr) rtc base + 0x08 rtc status (rtcs) reserved rtc base + 0x0c rtc clock divider (rtcdv) rtc clock divider (rtcdv) rtc base + 0x10 rtc control register (rtccr) rtc control register rtc base + 0x14 reserved rtc tic selection register (rtcts) rtc base + 0x18 reserved ticclk32k rtc base + 0x1c reserved ticclkpclk table 13-53: rtc register memory map
slow amba peripherals 13-68 GMS30C7201 data sheet 13.11analog ? digital converter interface controller (aic) 13.11.1overview the aic is a peripheral which includes an adc, and allows the cpu to read touch panel position, battery level and microphone signals. test mode notes: test mode 1: in this mode the aic is tested without using the adc and touch panel. there is an additional register which provides 8-bit data instead of the adc output. there are some additional registers which allow all the aic output signals to the adc to be read back. these registers can be written to by software. test mode 2: in this mode, the adc is tested. additional registers provide the input data to the adc (adc test). these registers can be written to by software. there is an additional register to allow the adc data output signal (ad signal) to the aic to be read back. features:  8khz and 11.02khz counter operation clock  software control of adc operation  five analog input channels, allocated to three functions: 1) touch panel position - uses full 10-bit adc resolution - touch panel drive signal generation - multiple data reads for each single touch - four sample rates 2) battery check - main and backup battery check 3) input sound - 8-bit mono sound data - two sample rates mode (8khz or 11.02khz) - 16-byte sound data buffers  interrupt status register (for multiple interrupt sources)  power down mode
slow amba peripherals 13-69 GMS30C7201 data sheet 13.11.2aic unit block diagram figure 13-12: aic module block diagram figure 13-13: adc block & external connection diagram
slow amba peripherals 13-70 GMS30C7201 data sheet 13.11.3aic unit hardware interface and signal description name type source/ destination description pclk in uart clock uart clock. bnres in apb bridge reset signal generated from the apb bridge. aclk out aic unit/adc adc operation clock output (pclk or test clk). pa[7:2] in apb bridge this is the peripheral address bus, which is used by an individual peripheral for decoding register accesses to that peripheral. the addresses become valid before pstb goes high, and remain valid after pstb goes low. pd[31:0] inout apb peripherals, bd bus this is the bi-directional peripheral data bus. the data bus is driven by this block during read cycles (when pwrite is low). pstb in apb bridge this strobe signal is used to time all accesses on the peripheral bus. the falling edge of pstb is coincident with the falling edge of bclk . pwrite in apb bridge when high, this signal indicates a write to a peripheral. when low, it indicates a read from a peripheral. this signal has the same timing as the peripheral address bus. it becomes valid before pstb goes high and remains valid after pstb goes low. psel in apb bridge when high, this signal indicates that this module has been selected by the apb bridge. this selection is a decode of the system address bus (asb). for more details, see amba peripheral bus controller (arm ddi0044). intaic out interrupt controller interrupt request when either touch panel buffer is full, or sound buffer is full, or battery data is checked. aa[3:0] out ad converter this is the address bus used to select a register in the adc unit. ad[7:0] inout ad converter, aic this is a the bi-directional data bus which is connected to the adc. aasn out ad converter address strobe signal for accessing adc registers. when there is a signal transition to a low state, address is valid. awrn out ad converter write strobe signal to write control or status register of adc. this is an active low signal. ardn out ad converter read strobe signal to read the contents of adc registers. this is an active low signal. aiostop out ad converter this signal is used to stop input/output operation of the adc. when this signal becomes high (1), all adc operations will stop, to save power to the adc drive. table 13-54: aic signal descriptions
slow amba peripherals 13-71 GMS30C7201 data sheet 13.11.4aic unit register address map atest out ad converter adc test signal. this signal has the value of 0 in normal mode. caltest out ad converter adc test signal. this signal has the value of 0 in normal mode. data in ad converter adc test signal. otr in ad converter adc test signal. p0 in ad converter adc test signal. aiadn in ad converter adc test signal. swxn out ad converter drive signal for the touch panel of x-axis. this signal is used to switch touch panel bias transistors. note: when driving the touch panel, only one of the swxn or swyn signals go high at any one time. swyn out ad converter drive signal for the touch panel of y-axis. this signal is used to switch the bias transistors. note: when driving the touch panel, only one of the swxn or swyn signals go high at any one time. swxp out ad converter inverted swxn register. swyp out ad converter inverted swyn register. name type source/ destination description table 13-54: aic signal descriptions (continued) address name description r/w size (bits) aic base + 0x00 aictctr touch panel control register r/w 8 aic base + 0x04 aicbctr battery control register r/w 8 aic base + 0x08 aicsctr sound control register r/w 8 aic base + 0x0c aicpower power down control register r/w 8 aic base + 0x10 aicsr status register ro 8 aic base + 0x30 aictpdr0 touch panel 1st sample data register (x,y) ro 32 aic base + 0x34 aictpdr1 touch panel 2nd sample data register (x,y) ro 32 aic base + 0x38 aictpdr2 touch panel 3rd sample data register (x,y) ro 32 aic base + 0x3c aictpdr3 touch panel 4th sample data register (x,y) ro 32 aic base + 0x50 to aic base + 0x5c aicsdr0 to aicsdr3 sound data register 0 ? 3. each register stores 4 x 8-bits of sound data. ro 32 table 13-55: aic unit register address map
slow amba peripherals 13-72 GMS30C7201 data sheet 13.11.5aic unit register description status register (aicsr) the status register shows the interrupt sources. when the aic unit generates the interrupt intaic to the cpu, the cpu first reads the status register of the aic unit. ints bits of aicsr indicate which device generated the interrupt. aic base + 0x70 aicbdr main and backup battery data register ro 16 aic base + 0x80 aictstcr test control register r/w 8 aic base + 0x84 aictstr0 this is a test register to allow the clock (aclk) signal to the adc to be read back. this register is readable in both normal mode and test mode. ro 8 aic base + 0x88 aictstr1 this is a test register that provides 8-bit data (ad) instead of the adc output in aic test mode. r/w 8 aic base + 0x90 aictstr2 this is a test register to allow aic output signals to the adc and to the interrupt controller to be read back (intaic, aasn, awrn, ardn, aiostop). ro 8 aic base + 0x94 aictstr3 this is a test register to allow the aic output signal to the adc and the touch panel to be read back (swxn, swyn, swxp, swyp and aa). ro 8 aic base + 0x98 aictstr4 this is a test register to allow the aic output signal to the adc to be read back in aic test mode (ad). ro 8 aic base + 0xc0 adctstr0 this register provides aa, aasn, awrn, ardn and aiostop values instead of the aic output in adc test mode. r/w 8 aic base + 0xc4 adctstr1 this register provides ad values instead of the aic output in adc test mode. r/w 8 aic base + 0xd0 adctstr2 this is a test register to allow the adc output signal to the aic to be read back in adc test mode. ro 8 aic base + 0xd4 adctstr3 this register provides atest and caltest values. r/w 8 aic base + 0xd8 adctstr4 this is a test register to allow the adc output signal to the aic to be read back in adc test mode (data, otr, po and aiadn). ro 16 aic base + 0xdc tclk this register is used to generate tclk in test mode. virtual register 0 address name description r/w size (bits) table 13-55: aic unit register address map (continued) bit initial name function 7 0 inttps interrupt touch panel status bit 6 0 intmbs interrupt main battery status bit table 13-56: aicsr bit functions
slow amba peripherals 13-73 GMS30C7201 data sheet 5 0 intbbs interrupt backup battery status bit 4 0 intsds interrupt sound status bit 3 ? 0 - - reserved bits bit initial name function table 13-56: aicsr bit functions
slow amba peripherals 13-74 GMS30C7201 data sheet touch panel control register (aictctr) the aic touch panel control register is used to control touch panel sampling operations. if tpc bit is set to 1, the touch panel data sampling starts (enabled). if tpc is reset to 0, the sampling operation stops (disabled). the aic unit has eight sampling modes for touch panel data acquisition. the sampling rate is selected by the tclk bits and sclk of aicsctr. for eight sample rates, tclk bits have to be set between 00 ? 11, and sclk of aicsctr has to be set between 0 ? 1 as shown in table 13-57: aictctr bit functions . the tpc bit should be cleared at the beginning of the interrupt service routine to disable the touch panel. battery control register (aicbctr) the aic battery check control register is used to control the battery check operations. if the mbc bit is set to 1, the battery check operation is enabled for the main battery. if mbc is reset to 0, the check operation is stopped (disabled). the bbc bit performs a similar function for the backup battery. when a battery check operation is needed, the enable bit (mbc,bbc) must first be reset to 0 and then set to 1(start). bit initial name function 7 0 tpc touch panel sampling control bit: 0 - disable 1 - enable 6 0 tmsk touch panel interrupt mask bit: 0-mask 1-unmask 5 ? 2 - - reserved bits 1 ? 0 00 tclk touch panel data sampling rate selection. when sclk = 0: 00 - approx. 400 samples/sec 01 - approx. 200 samples/sec 10 - approx. 100 samples/sec 11 - approx. 50 samples/sec when sclk = 1: 00 - approx. 550 samples/sec 01 - approx. 275 samples/sec 10 - approx. 138 samples/sec 11 - approx. 69 samples/sec table 13-57: aictctr bit functions bit initial name function 7 0 mbc main battery check control bit: 0 - disable 1 - enable 6 0 mmsk main battery interrupt mask bit: 0-mask 1-unmask table 13-58: aicbctr bit functions
slow amba peripherals 13-75 GMS30C7201 data sheet sound control register (aicsctr) the aic sound sampling control register controls the sound input and voice recording operations. if the sdc bit is set to 1, the input sound data sampling operation is enabled. if sdc is reset to 0, the operation stops (disabled). the sdc bit should be cleared at the beginning of the interrupt service routine to disable the sound sampling. 5 0 bbc backup battery check control bit: 0 - disable 1 - enable 4 0 bmsk backup battery interrupt mask bit: 0-mask 1-unmask 3 ? 0 - - reserved bits bit initial name function 7 0 sdc sound sampling control bit: 0 - disable 1 - enable 6 0 sclk sound data sampling rate selection: 0-8khz 1-11.02khz 5 smsk sound interrupt mask bit: 0-mask 1-unmask 4 ? 0 - - reserved bits table 13-59: aicsctr bit functions bit initial name function table 13-58: aicbctr bit functions (continued)
slow amba peripherals 13-76 GMS30C7201 data sheet touch panel data register 0 ? 3 (aictpdr0 ? 3) four 32-bit registers are used to store two (x, y axis) 12-bit values from the adc. (that is, in one 32-bit register the 12 least significant bits are the y-data, and bits 16 ? 27 are the x-data.) the aic is connected to the adc by an 8-bit bus, but connected to the cpu by a 32-bit bus. therefore the hardware reads the adc twice to get the 12-bit value. when a touch panel with a resolution of 1024 bits per axis is used, the software need only use the ten most significant bits (the software should ignore the lower two bits). when the last half-word of the last buffer register is written, intaic is generated and cpu reads all four buffer registers simultaneously (burst read). bit initial name function 31 ? 28 all 0 reserved 27 ? 16 all 0 1st tp x data the 1st touch panel x-axis sample data 15 ? 12 all 0 reserved 11 ? 0 all 0 1st tp y data the 1st touch panel y-axis sample data table 13-60: aictpdr0 bit functions bit initial name function 31 ? 28 all 0 reserved 27 ? 16 all 0 2nd tp x data the 2nd touch panel x-axis sample data 15 ? 12 all 0 reserved 11 ? 0 all 0 2nd tp y data the 2nd touch panel y-axis sample data table 13-61: aictpdr1 bit functions bit initial name function 31 ? 28 all 0 reserved 27 ? 16 all 0 3rd tp x data the 3rd touch panel x-axis sample data 15 ? 12 all 0 reserved 11 ? 0 all 0 3rd tp y data the 3rd touch panel y-axis sample data table 13-62: aictpdr2 bit functions
slow amba peripherals 13-77 GMS30C7201 data sheet sound buffer registers (aicsdr0 - aicsdr3) the aic has four word-length, read-only registers for 8-bit sound input data from a microphone. each register can store four sound samples. the last byte of the last buffer register is written into, the interrupt intaic is generated and the cpu reads all four buffer registers (burst read). bit initial name function 31 ? 28 all 0 reserved 27 ? 16 all 0 4th tp x data the 4th touch panel x-axis sample data 15 ? 12 all 0 reserved 11 ? 0 all 0 4th tp y data the 4th touch panel y-axis sample data table 13-63: aictpdr3 bit functions bit initial name function 31 ? 24 all 0 sd7 ? sd0 4th sound output 23 ? 16 all 0 sd7 ? sd0 3rd sound output 15 ? 8 all 0 sd7 ? sd0 2nd sound output 7 ? 0all 0sd7 ? sd0 1st sound output table 13-64: aicsdr0 bit functions bit initial name function 31 ? 24 all 0 sd7 ? sd0 8th sound output 23 ? 16 all 0 sd7 ? sd0 7th sound output 15 ? 8 all 0 sd7 ? sd0 6th sound output 7 ? 0all 0sd7 ? sd0 5th sound output table 13-65: aicsdr1 bit functions bit initial name function 31 ? 24 all 0 sd7 ? sd0 12th sound output 23 ? 16 all 0 sd7 ? sd0 11th sound output 15 ? 8 all 0 sd7 ? sd0 10th sound output 7 ? 0all 0sd7 ? sd0 9th sound output table 13-66: aicsdr2 bit functions
slow amba peripherals 13-78 GMS30C7201 data sheet main/backup battery data register (aicbdr) this 16-bit register stores the levels of the main and backup battery. bit initial name function 31 ? 24 all 0 sd7 ? sd0 16th sound output 23 ? 16 all 0 sd7 ? sd0 15th sound output 15 ? 8 all 0 sd7 ? sd0 14th sound output 7 ? 0all 0sd7 ? sd0 13th sound output table 13-67: aicsdr3 bit functions bit initial name function 15 ? 8 all 0 mbd7 ? mbd0 main battery check data 7 ? 0 all 0 bbd7 ? bbd0 backup battery check data table 13-68: aicbdr bit functions
slow amba peripherals 13-79 GMS30C7201 data sheet test mode control registers (aictstcr) this 8-bit register controls the aic unit test mode. test registers (aictstr0 ? aictstr4, adctstr0 ? adctstr4) ten 8-bit registers are used to save data for the aic unit test and adc unit test. the functions of each of the registers are described below. the aictstr0, aictstr1, adctstr0 and adctstr1 registers can be read and written, but the others are read- only registers. bit initial name function 7 0 tstcr7 test enable 0 - normal mode 1-test mode 6 0 tstcr6 test mode bit 0-aic test mode 1 - adc test mode 5 0 tstcr5 ticclken 0 - aic input clk - pclk 1 - aic input clk - tclk 4 0 tstcr4 oclkselect. this bit is used only to test the aic block: 0 - the clock (oclk) generated inside aic is used. oclk is slow. 1 - pclk is used instead of oclk to increase the speed in test mode. 3 0 tstcr3 tcountmode this bit is used to reduce the touch panel interrupt interval, and is used only in test mode. 0 - normal interrupt interval 1 - fixed interrupt interval, regardless of sampling rate 2 0 tstcr2 test bit 0 - normal output to adc 1 - test output to adc 1 ? 0 - - reserved table 13-69: aictstcr bit functions bit initial name function 7 x clock bit is to read outgoing aclk signals to adc. in normal mode, pclk is bypassed to aclk, but in test mode aclk has the value of tclk. this register is readable in both normal mode and test mode. 6 ? 0 - - reserved table 13-70: aictstr0 bit functions
slow amba peripherals 13-80 GMS30C7201 data sheet bit initial name function 7 ? 0 all 0 tstd7 ? 0 test register to provide 8-bit data (ad) instead of the adc output in aic test mode. table 13-71: aictstr1 bit functions bit initial name function 7 0 tstd7 bit to read outgoing intaic signal value to adc 6 ? 4 - - reserved 3 1 tdtd3 bit to read outgoing aasn data to adc 2 1 tstd2 bit to read outgoing ardn data to adc 1 1 tstd1 bit to read outgoing awrn data to adc 0 1 tstd0 bit to read outgoing aiostop data to adc table 13-72: aictstr2 bit functions bit initial name function 7 0 tstd7 bit to read outgoing swxn signal to touch panel 6 0 tstd6 bit to read outgoing swyn signal to touch panel 5 1 tstd5 bit to read outgoing swxp signal to touch panel 4 1 tstd4 bit to read outgoing swyp signal to touch panel 3 ? 0 all 0 tstd3 ? 0 bits to read outgoing aa[3:0] data to adc table 13-73: aictstr3 bit functions bit initial name function 7 ? 0 all 0 tstd7 ? 0 bits to read outgoing ad[7:0] data to adc table 13-74: aictstr4 bit functions
slow amba peripherals 13-81 GMS30C7201 data sheet bit initial name function 7 ? 4 all 1 tstd7 ? 4 bits to drive aa for testing adc 3 1 tstd3 bit to drive aasn for testing adc 2 1 tstd2 bit to drive ardn for testing adc 1 1 tstd1 bit to drive awrn for testing adc 0 1 tstd0 bit to drive aiostop for testing adc table 13-75: adctstr0 bit functions bit initial name function 7 ? 0 all 0 tstd7 ? 0 bits to drive ad for testing adc table 13-76: adctstr1 bit functions bit initial name function 7 ? 0 x tstd7 ? 0 bits to read ad data from the adc in adc test mode table 13-77: adctstr2 bit functions bit initial name function 7 0 tstd7 bits to drive atest for testing adc 6 0 tstd6 bits to drive caltest for testing adc 5 ? 0 - - reserved table 13-78: adctstr3 bit functions bit initial name function 15 ? 13 x tstd15 ? 13 reserved 12 ? 3xtstd12 ? 3 bits to read data data from the adc in adc test mode 2 x tstd2 bits to read otr data from the adc in adc test mode table 13-79: adctstr4 bit functions
slow amba peripherals 13-82 GMS30C7201 data sheet power control register (aicpower) tclk this register does not exist; it is used to generate tic clk in test mode. when apb address (pa) is tclk register address, and psel and pstb are high in test mode, tclk is high; otherwise tclk is low. 1 x tstd1 bits to read p0 data from the adc in adc test mode 0 x tstd0 bits to read aiadn data from the adc in adc test mode bit initial name function table 13-79: adctstr4 bit functions (continued) bit initial name function 7 ? 1 x pcr7 ? 1 reserved 0 0 pcr0 0 - power down mode (pclk and tclk are disabled) 1 - normal mode table 13-80: aicpower bit functions
14-1 GMS30C7201 data sheet 14.1 overview 14-2 14.2 software development debug and test interface 14-3 14.3 test access port and boundary-scan 14-4 14.4 production test features 14-26 debug and test interface 14
debug and test interface 14-2 GMS30C7201 data sheet 14.1 overview the GMS30C7201 has built-in features which enable debug and test in a number of different contexts. firstly, there are circuit structures to help with software development. secondly, the device contains boundary scan cells for circuit board test. finally, the device contains some special test modes which enable the generation production patterns for the device itself.
debug and test interface 14-3 GMS30C7201 data sheet 14.2 software development debug and test interface the arm720t and piccolo processors incorporated inside GMS30C7201 contain hardware extensions for advanced debugging features. these are intended to ease user development and debugging of application software, operating systems, and the hardware itself. full details of the debug interfaces and their programming can be found in arm720t data sheet (arm ddi-0087) and piccolo data sheet (arm ddi-0128). the multiice product enables the arm720t and piccolo macrocells to be debugged in one environment. refer to guide to multiice (arm dui-0048).
debug and test interface 14-4 GMS30C7201 data sheet 14.3 test access port and boundary-scan GMS30C7201 contains full boundary scan on its inputs and outputs to help with circuit board test. this supports both intest and extest, allowing patterns to be applied serially to the GMS30C7201 when fixed in a board and for full circuit board connection respectively. the boundary-scan interface conforms to the ieee std. 1149.1- 1990, standard test access port and boundary-scan architecture. (please refer to this standard for an explanation of the terms used in this section and for a description of the tap controller states.) the boundary-scan interface provides a means of testing the core of the device when it is fitted to a circuit board, and a means of driving and sampling all the external pins of the device irrespective of the core state. this latter function permits testing of both the device's electrical connections to the circuit board, and (in conjunction with other devices on the circuit board having a similar interface) testing the integrity of the circuit board connections between devices. the interface intercepts all external connections within the device, and each such ? cell ? is then connected together to form a serial register (the boundary scan register). the whole interface is controlled via 5 dedicated pins: tdi , tms , tck , ntrst and tdo . figure 14-1: test access port (tap) controller state transitions shows the state transitions that occur in the tap controller. figure 14-1: test access port (tap) controller state transitions select-ir-scan capture-ir tms=0 shift-ir tms=0 exit1-ir tms=1 pause-ir tms=0 exit2-ir tms=1 update-ir tms=1 tms=0 tms=0 tms=1 tms=1 tms=0 select-dr-scan capture-dr tms=0 shift-dr tms=0 exit1-dr tms=1 pause-dr tms=0 exit2-dr tms=1 update-dr tms=1 test-logic reset run-test/idle tms=0 tms=1 tms=0 tms=0 tms=0 tms=1 tms=1 tms=0 tms=1 tms=1 tms=1 tms=1 tms=1 tms=0 tms=0
debug and test interface 14-5 GMS30C7201 data sheet 14.3.1 reset the boundary-scan interface includes a state-machine controller (the tap controller). a pulldown resistor is included in the ntrst pad which holds the tap controller state machine in a safe state after power up. in order to use the boundary scan interface, ntrst should be driven high to take the tap state machine out of reset. the action of reset (either a pulse or a dc level) is as follows:  system mode is selected (i.e. the boundary scan chain does not intercept any of the signals passing between the pads and the core).  idcode mode is selected. if tck is pulsed, the contents of the id register will be clocked out of tdo . note the tap controller inside GMS30C7201 contains a scan chip register which is reset to the value b0011 thus selecting the boundary scan chain. if this register is programmed to any value other than b0011, then it must be reprogrammed with b0011 or a reset applied before boundary scan operation can be attempted. 14.3.2 pullup resistors the ieee 1149.1 standard requires pullup resistors in the input pins. however, to ensure safe operation an internal pulldown is present in the ntrst pin and therefore will have to be driven high when using this interface. 14.3.3 instruction register the instruction register is 4 bits in length. there is no parity bit. the fixed value loaded into the instruction register during the capture-ir controller state is: 0001. 14.3.4 public instructions the following public instructions are supported: pin internal resistor tclk pullup ntrst pulldown tms pullup tdi pullup table 14-1: internal resistors for input pins instruction binary code extest 0000 sample/preload 0011 clamp 0101 highz 0111 table 14-2: supported public instructions
debug and test interface 14-6 GMS30C7201 data sheet in the descriptions that follow, tdi and tms are sampled on the rising edge of tck and all output transitions on tdo occur as a result of the falling edge of tck . extest (0000) the bs (boundary-scan) register is placed in test mode by the extest instruction.the extest instruction connects the bs register between tdi and tdo .when the instruction register is loaded with the extest instruction, all the boundary-scan cells are placed in their test mode of operation. in the capture-dr state, inputs from the system pins and outputs from the boundary-scan output cells to the system pins are captured by the boundary-scan cells. in the shift-dr state, the previously captured test data is shifted out of the bs register via the tdo pin, whilst new test data is shifted in via the tdi pin to the bs register parallel input latch. in the update-dr state, the new test data is transferred into the bs register parallel output latch. note that this data is applied immediately to the system logic and system pins. the first extest vector should be clocked into the boundary-scan register, using the sample/preload instruction, prior to selecting extest to ensure that known data is applied to the system logic. sample/preload (0011) the bs (boundary-scan) register is placed in normal (system) mode by the sample/ preload instruction. the sample/preload instruction connects the bs register between tdi and tdo . when the instruction register is loaded with the sample/preload instruction, all the boundary-scan cells are placed in their normal system mode of operation. in the capture-dr state, a snapshot of the signals at the boundary-scan cells is taken on the rising edge of tck . normal system operation is unaffected. in the shift- dr state, the sampled test data is shifted out of the bs register via the tdo pin, whilst new data is shifted in via the tdi pin to preload the bs register parallel input latch. in the update-dr state, the preloaded data is transferred into the bs register parallel output latch. note that this data is not applied to the system logic or system pins while the sample/preload instruction is active. this instruction should be used to preload the boundary-scan register with known data prior to selecting the intest or extest instructions. clamp (0101) the clamp instruction connects a 1 bit shift register (the bypass register) between tdi and tdo . when the clamp instruction is loaded into the instruction register, the state of all output signals is defined by the values previously loaded into the boundary- scan register. a guarding pattern should be pre-loaded into the boundary-scan register using the sample/preload instruction prior to selecting the clamp instruction. in the capture-dr state, a logic 0 is captured by the bypass register. in the shift-dr clampz 1001 intest 1100 idcode 1110 bypass 1111 instruction binary code table 14-2: supported public instructions
debug and test interface 14-7 GMS30C7201 data sheet state, test data is shifted into the bypass register via tdi and out via tdo after a delay of one tck cycle. note that the first bit shifted out will be a zero. the bypass register is not affected in the update-dr state. highz (0111) the highz instruction connects a 1 bit shift register (the bypass register) between tdi and tdo . when the highz instruction is loaded into the instruction register, all outputs are placed in an inactive drive state. in the capture-dr state, a logic 0 is captured by the bypass register. in the shift-dr state, test data is shifted into the bypass register via tdi and out via tdo after a delay of one tck cycle. note that the first bit shifted out will be a zero. the bypass register is not affected in the update-dr state. clampz (1001) the clampz instruction connects a 1 bit shift register (the bypass register) between tdi and tdo .when the clampz instruction is loaded into the instruction register, all outputs are placed in an inactive drive state, but the data supplied to the disabled output drivers is derived from the boundary-scan cells. the purpose of this instruction is to ensure, during production testing, that each output driver can be disabled when its data input is either a 0 or a 1.a guarding pattern (specified for this device at the end of this section) should be pre-loaded into the boundary-scan register using the sample/ preload instruction prior to selecting the clampz instruction. in the capture-dr state, a logic 0 is captured by the bypass register. in the shift-dr state, test data is shifted into the bypass register via tdi and out via tdo after a delay of one tck cycle. note that the first bit shifted out will be a zero. the bypass register is not affected in the update-dr state. intest (1100) the bs (boundary-scan) register is placed in test mode by the intest instruction. the intest instruction connects the bs register between tdi and tdo . when the instruction register is loaded with the intest instruction, all the boundary-scan cells are placed in their test mode of operation. in the capture-dr state, the complement of the data supplied to the core logic from input boundary-scan cells is captured, while the true value of the data that is output from the core logic to output boundary- scan cells is captured. note that capture-dr captures the complemented value of the input cells for testability reasons. in the shift-dr state, the previously captured test data is shifted out of the bs register via the tdo pin, whilst new test data is shifted in via the tdi pin to the bs register parallel input latch. in the update-dr state, the new test data is transferred into the bs register parallel output latch. note that this data is applied immediately to the system logic and system pins. the first intest vector should be clocked into the boundary-scan register, using the sample/preload instruction, prior to selecting intest to ensure that known data is applied to the system logic. single-step operation is possible using the intest instruction. idcode (1110) the idcode instruction connects the device identification register (or id register) between tdi and tdo . the id register is a 32-bit register that allows the manufacturer, part number and version of a component to be determined through the tap. the idcode returned will be that for the arm720t core. when the instruction register is loaded with the idcode instruction, all the boundary-scan cells are placed in their normal (system) mode of operation. in the capture-dr state, the device identification code (specified at the end of this section) is captured by the id register. in the shift-dr state, the previously captured device identification code is shifted out of the id register via the tdo pin, whilst data is shifted in via the tdi pin into the id register. in the update-dr state, the id register is unaffected.
debug and test interface 14-8 GMS30C7201 data sheet bypass (1111) the bypass instruction connects a 1 bit shift register (the bypass register) between tdi and tdo . when the bypass instruction is loaded into the instruction register, all the boundary-scan cells are placed in their normal (system) mode of operation. this instruction has no effect on the system pins. in the capture-dr state, a logic 0 is captured by the bypass register. in the shift-dr state, test data is shifted into the bypass register via tdi and out via tdo after a delay of one tck cycle. note that the first bit shifted out will be a zero. the bypass register is not affected in the update-dr state.
debug and test interface 14-9 GMS30C7201 data sheet 14.3.5 test data registers figure 14-2: boundary scan block diagram illustrates the structure of the boundary scan logic figure 14-2: boundary scan block diagram bypass register purpose: this is a single bit register which can be selected as the path between tdi and tdo to allow the device to be bypassed during boundary-scan testing. length: 1 bit operating mode: when the bypass instruction is the current instruction in the instruction register, serial data is transferred from tdi to tdo in the shift-dr state with a delay of one tck cycle. GMS30C7201 core logic instruction register instruction decoder device id register bypass register tap controller ntdoen ntrst tck tms tdi tdo bsoutcell bsoutcell bsincell i/o cell bsoutnencell bsincell bsinencell
debug and test interface 14-10 GMS30C7201 data sheet there is no parallel output from the bypass register. a logic 0 is loaded from the parallel input of the bypass register in the capture-dr state. boundary scan (bs) register purpose: the bs register consists of a serially connected set of cells around the periphery of the device, at the interface between the core logic and the system input/ output pads. this register can be used to isolate the core logic from the pins and then apply tests to the core logic, or conversely to isolate the pins from the core logic and then drive or monitor the system pins. operating modes: the bs register is selected as the register to be connected between tdi and tdo only during the sample/ preload, extest and intest instructions. values in the bs register are used, but are not changed, during the clamp and clampz instructions. in the normal (system) mode of operation, straight-through connections between the core logic and pins are maintained and normal system operation is unaffected. in test mode (i.e. when either extest or intest is the currently selected instruction), values can be applied to the core logic or output pins independently of the actual values on the input pins and core logic outputs respectively. on the GMS30C7201 all of the boundary scan cells include an update register and thus all of the pins can be controlled in the above manner. additional boundary-scan cells are interposed in the scan chain in order to control the enabling of tristateable buses. the values stored in the bs register after power-up are not defined. similarly, the values previously clocked into the bs register are not guaranteed to be maintained across a boundary scan reset (from forcing ntrst low or entering the test logic reset state). single-step operation GMS30C7201 is a static design and there is no minimum clock speed. it can therefore be single-stepped while the intest instruction is selected and the plls are bypassed. this can be achieved by serializing a parallel stimulus and clocking the resulting serial vectors into the boundary-scan register. when the boundary-scan register is updated, new test stimuli are applied to the core logic inputs; the effect of these stimuli can then be observed on the core logic outputs by capturing them in the boundary-scan register.
debug and test interface 14-11 GMS30C7201 data sheet 14.3.6 boundary scan interface signals figure 14-3: boundary scan general timing figure 14-4: boundary scan tristate timing figure 14-5: boundary scan reset timing
debug and test interface 14-12 GMS30C7201 data sheet table 14-3: provisional boundary scan ac parameters (units in ns) the ac parameters are based on simulation results using 0.0pf circuit signal loads. delays should be calculated using manufacturers output derating values for the actual circuit capacitance loading. the correspondence between boundary-scan cells and system pins, system direction controls and system output enables is shown below. the cells are listed in the order in which they are connected in the boundary-scan register, starting with the cell closest to tdi. all outputs are three-state outputs. all boundary-scan register cells at input pins can apply tests to the on-chip system logic. extest/clamp guard values specified in the table below should be clocked into the boundary-scan register (using the sample/preload instruction) before the extest, clamp or clampz instructions are selected to ensure that known data is applied to the system logic during the test. the intest guard values shown in the table below should be clocked into the boundary-scan register (using the sample/ preload instruction) before the intest instruction is selected to ensure that all outputs are disabled. an asterisk in the guard value column indicates that any value can be submitted (as test requires), but ones and zeros should always be placed as shown. symbol parameter min max tbscl tck low period 50 - tbsch tck high period 50 - tbsis tms, tdi setup to tckr 0 - tbsih tms, tdi hold from tckr 2 - tbsoh tdo output hold from tckf 3 - tbsod tdo output delay from tckf - 20 tbsss test mode data in setup to tckr 2 - tbssh test mode data in hold from tckf 5 - tbsdh test mode data out hold from tckf 3 - tbsdd test mode data out delay from tckf - 20 tbsoe tdo output enable delay from tckf 2 15 tbsoz test mode data enable delay from tckf 2 15 tbsde tdo output disable delay from tckf 2 15 tbsdz test mode data disable delay from tckf 2 15 tbsr ntrst minimum pulse width 25 - tbsrs tms setup to ntrstr 20 - tbsrh tms hold from ntrstr 20 -
debug and test interface 14-13 GMS30C7201 data sheet number cell name pin type output enable bs cell guard value in ex 1 uoscjtag oscin in - * 0 2 ulblen lblen out - 0 * 3 uirdin irdin in - * 0 4 uld11 ld[11] in - * * 5 uld11 ld[11] out jnlden=0 * * 6 jnlden - outen0 - 1 * 7 ullp llp out - 0 * 8ulac lac out- 0* 9 ulcden lcden out - 0 * 10 uld7 ld[7] in - * * 11 uld7 ld[7] out jnlden=0 * * 12 ulfp lfp out - 0 * 13 ulcp lcp out - 0 * 14 uld9 ld[9] in - * * 15 uld9 ld[9] out jnlden=0 * * 16 uld3 ld[3] in - * * 17 uld3 ld[3] out jnlden=0 * * 18 uld2 ld[2] in - * * 19 uld2 ld[2] out jnlden=0 * * 20 uld10 ld[10] in - * * 21 uld10 ld[10] out jnlden=0 * * 22 uld8 ld[8] in - * * 23 uld8 ld[8] out jnlden=0 * * 24 uld5 ld[5] in - * * 25 uld5 ld[5] out jnlden=0 * * 26 uvgahs vgahs out - 0 * 27 uld6 ld[6] in - * * 28 uld6 ld[6] out jnlden=0 * * table 14-4: boundary scan signals and pins
debug and test interface 14-14 GMS30C7201 data sheet 29 uld4 ld[4] in - * * 30 uld4 ld[4] out jnlden=0 * * 31 uld0 ld[0] in - * * 32 uld0 ld[0] out jnlden=0 * * 33 uld1 ld[1] in - * * 34 uld1 ld[1] out jnlden=0 * * 35 uvgavs vgavs out - 0 * 36 ussdin ssdin in - * 0 37 ussout ssout out - 0 * 38 unsscs nsscs out - 1 * 39 uportd5 portd[5] in - * 0 40 uportd5 portd[5] out jmuxnportden[5]=0 0 * 41 jmuxnportden[5] - outen0 - 1 * 42 ussclk ssclk out - 0 * 43 uatsyp atsyp out - 0 * 44 uatsym atsym out - 0 * 45 uatsxp atsxp out - 0 * 46 umclk mclk in - * 0 47 umdout mdout out - 0 * 48 umrly mrly out - 0 * 49 uatsxm atsxm out - 0 * 50 umdfr mdfr in - * 0 51 umring mring in - * 0 52 umdin mdin in - * 0 53 urtoscjtag rtcoscin in - * 0 54 uusout0 usout[0] out - 0 * 55 unmcon nmcon out - 1 * 56 uusin0 usin[0] in - * 0 57 unudtr1 nudtr[1] out - 1 * 58 unucts1 nucts[1] in - * 0 59 unucts0 nucts[0] in - * 0 60 unurts0 nurts[0] out - 1 * table 14-4: boundary scan signals and pins
debug and test interface 14-15 GMS30C7201 data sheet 61 uusin1 usin[1] in - * 0 62 unurts1 nurts[1] out - 1 * 63 uusout1 usout[1] out - 0 * 64 unudsr0 nudsr[0] in - * 0 65 unudtr0 nudtr[0] out - 1 * 66 unudcd1 nudcd[1] in - * 0 67 ukscano10 kscano[10] out - 0 * 68 unudcd0 nudcd[0] in - * 0 69 unudsr1 nudsr[1] in - * 0 70 ukscano8 kscano[8] out - 0 * 71 ukscano5 kscano[5] out - 0 * 72 ukscano6 kscano[6] out - 0 * 73 ukscano7 kscano[7] out - 0 * 74 ukscano9 kscano[9] out - 0 * 75 ukscano3 kscano[3] out - 0 * 76 ukscano1 kscano[1] out - 0 * 77 ukscano2 kscano[2] out - 0 * 78 ukscano4 kscano[4] out - 0 * 79 ukscani7 kscani[7] in - * 0 80 ukscani6 kscani[6] in - * 0 81 ukscani4 kscani[4] in - * 0 82 ukscano0 kscano[0] out - 0 * 83 ukscani5 kscani[5] in - * 0 84 ukscani2 kscani[2] in - * 0 85 ukscani1 kscani[1] in - * 0 86 ukscani0 kscani[0] in - * 0 87 ukscani3 kscani[3] in - * 0 88 unrcs4 nrcs[4] in - * 0 89 unrcs4 nrcs[4] out jmuxnportden[2]=0 1 * 90 jmuxnportden[2] - outen0 - 1 * 91 unrcs3 nrcs[3] in - * 0 92 unrcs3 nrcs[3] out jmuxnportden[1]=0 1 * table 14-4: boundary scan signals and pins
debug and test interface 14-16 GMS30C7201 data sheet 93 jmuxnportden[1] - outen0 - 1 * 94 unrcs5 nrcs[5] in - * 0 95 unrcs5 nrcs[5] out jmuxnportden[3]=0 1 * 96 jmuxnportden[3] - outen0 - 1 * 97 uexprdy exprdy in - * 0 98 ubootbit0 bootbit[0] in - * 0 99 ura25 ra[25] out - * * 100 uexbclk exbclk in - * 0 101 uexbclk exbclk out jmuxnportden[0]=0 0 * 102 jmuxnportden[0] - outen0 - 1 * 103 ubootbit1 bootbit[1] in - * 0 104 ura22 ra[22] out - * * 105 ura23 ra[23] out - * * 106 ura17 ra[17] out - * * 107 ura24 ra[24] out - * * 108 ura19 ra[19] out - * * 109 uportd4 portd[4] in - * 0 110 uportd4 portd[4] out jmuxnportden[4]=0 0 * 111 jmuxnportden[4] - outen0 - 1 * 112 ura20 ra[20] out - * * 113 ura12 ra[12] out - * * 114 ura21 ra[21] out - * * 115 ura15 ra[15] out - * * 116 ura13 ra[13] out - * * 117 ura16 ra[16] out - * * 118 ura18 ra[18] out - * * 119 ura8 ra[8] out - * * 120 ura10 ra[10] out - * * 121 ura11 ra[11] out - * * 122 ura14 ra[14] out - * * 123 ura3 ra[3] out - * * 124 ura6 ra[6] out - * * table 14-4: boundary scan signals and pins
debug and test interface 14-17 GMS30C7201 data sheet 125 ura7 ra[7] out - * * 126 ura9 ra[9] out - * * 127 ura4 ra[4] out - * * 128 unroe nroe out - 1 * 129 ura1 ra[1] out - * * 130 ura2 ra[2] out - * * 131 ura5 ra[5] out - * * 132 unrwe3 nrwe[3] out - 1 * 133 unrwe2 nrwe[2] out - 1 * 134 unrcs1 nrcs[1] out - 1 * 135 unrcs2 nrcs[2] out - 1 * 136 ura0 ra[0] out - * * 137 unrwe0 nrwe[0] out - 1 * 138 unrwe1 nrwe[1] out - 1 * 139 unrcs0 nrcs[0] out - 1 * 140 urd0 rd[0] in - * * 141 urd0 rd[0] out jnrden[0]=0 * * 142 urd1 rd[1] in - * * 143 urd1 rd[1] out jnrden[0]=0 * * 144 urd2 rd[2] in - * * 145 urd2 rd[2] out jnrden[0]=0 * * 146 urd6 rd[6] in - * * 147 urd6 rd[6] out jnrden[0]=0 * * 148 urd4 rd[4] in - * * 149 urd4 rd[4] out jnrden[0]=0 * * 150 urd7 rd[7] in - * * 151 urd7 rd[7] out - * * 152 jnrden[0] - outen0 - 1 * 153 urd10 rd[10] in - * * 154 urd10 rd[10] out jnrden[1]=0 * * 155 urd11 rd[11] in - * * 156 urd11 rd[11] out jnrden[1]=0 * * table 14-4: boundary scan signals and pins
debug and test interface 14-18 GMS30C7201 data sheet 157 urd3 rd[3] in - * * 158 urd3 rd[3] out jnrden[0]=0 * * 159 urd5 rd[5] in - * * 160 urd5 rd[5] out jnrden[0]=0 * * 161 urd9 rd[9] in - * * 162 urd9 rd[9] out jnrden[1]=0 * * 163 urd15 rd[15] in - * * 164 urd15 rd[15] out - * * 165 jnrden[1] - outen0 - 1 * 166 urd16 rd[16] in - * * 167 urd16 rd[16] out jnrden[2]=0 * * 168 urd8 rd[8] in - * * 169 urd8 rd[8] out jnrden[1]=0 * * 170 urd13 rd[13] in - * * 171 urd13 rd[13] out jnrden[1]=0 * * 172 urd19 rd[19] in - * * 173 urd19 rd[19] out jnrden[2]=0 * * 174 urd12 rd[12] in - * * 175 urd12 rd[12] out jnrden[1]=0 * * 176 urd20 rd[20] in - * * 177 urd20 rd[20] out jnrden[2]=0 * * 178 urd18 rd[18] in - * * 179 urd18 rd[18] out jnrden[2]=0 * * 180 urd14 rd[14] in - * * 181 urd14 rd[14] out jnrden[1]=0 * * 182 urd24 rd[24] in - * * 183 urd24 rd[24] out jnrden[3]=0 * * 184 urd17 rd[17] in - * * 185 urd17 rd[17] out jnrden[2]=0 * * 186 urd25 rd[25] in - * * 187 urd25 rd[25] out jnrden[3]=0 * * 188 urd22 rd[22] in - * * table 14-4: boundary scan signals and pins
debug and test interface 14-19 GMS30C7201 data sheet 189 urd22 rd[22] out jnrden[2]=0 * * 190 urd28 rd[28] in - * * 191 urd28 rd[28] out jnrden[3]=0 * * 192 urd21 rd[21] in - * * 193 urd21 rd[21] out jnrden[2]=0 * * 194 urd29 rd[29] in - * * 195 urd29 rd[29] out jnrden[3]=0 * * 196 urd31 rd[31] in - * * 197 urd31 rd[31] out - * * 198 jnrden[3] - outen0 - 1 * 199 urd27 rd[27] in - * * 200 urd27 rd[27] out jnrden[3]=0 * * 201 urd26 rd[26] in - * * 202 urd26 rd[26] out jnrden[3]=0 * * 203 urd23 rd[23] in - * * 204 urd23 rd[23] out - * * 205 jnrden[2] - outen0 - 1 * 206 upcbvccen0 pcbvccen[0] out - 0 * 207 upcbvccen1 pcbvccen[1] out - 0 * 208 upcbvppen0 pcbvppen[0] out - 0 * 209 urd30 rd[30] in - * * 210 urd30 rd[30] out jnrden[3]=0 * * 211 upcavccen0 pcavccen[0] out - 0 * 212 upcavccen1 pcavccen[1] out - 0 * 213 upcbvppen1 pcbvppen[1] out - 0 * 214 upcbvs0 pcbvs[0] in - * 0 215 upcbvs1 pcbvs[1] in - * 0 216 upcavs0 pcavs[0] in - * 0 217 upcavppen1 pcavppen[1] out - 0 * 218 upcavs1 pcavs[1] in - * 0 219 unpcbcd0 npcbcd[0] in - * 1 220 upcavppen0 pcavppen[0] out - 0 * table 14-4: boundary scan signals and pins
debug and test interface 14-20 GMS30C7201 data sheet 221 unpcboe npcboe out - 1 * 222 unpcbcd1 npcbcd[1] in - * 1 223 unpcacd0 npcacd[0] in - * 1 224 uportd7 portd[7] in - * 0 225 uportd7 portd[7] out jnportden[7]=0 0 * 226 jnportden[7] - outen0 - 1 * 227 upcbwp pcbwp in - * 0 228 unpcaoe npcaoe out - 1 * 229 unpcacd1 npcacd[1] in - * 1 230 upccbdrv pccbdrv out - 0 * 231 unpcbwe npcbwe out - 1 * 232 upcawp pcawp in - * 0 233 upcbready pcbready in - * 0 234 upcbbvd0 pcbbvd[0] in - * 0 235 upccadrv pccadrv out - 0 * 236 upcbbvd1 pcbbvd[1] in - * 0 237 upcaready pcaready in - * 0 238 upcabvd0 pcabvd[0] in - * 0 239 upcbreset pcbreset out - 0 * 240 upcabvd1 pcabvd[1] in - * 0 241 unpcbwait npcbwait in - * 1 242 unpcawe npcawe out - 1 * 243 unpcbiord npcbiord out - 1 * 244 upcareset pcareset out - 0 * 245 unpcbiowr npcbiowr out - 1 * 246 unpcawait npcawait in - * 1 247 upcbiporte pcbiporte out - 0 * 248 unpcaiord npcaiord out - 1 * 249 unpcbce0 npcbce[0] out - 1 * 250 unpcaiowr npcaiowr out - 1 * 251 unpcbce1 npcbce[1] out - 1 * 252 unpcace0 npcace[0] out - 1 * table 14-4: boundary scan signals and pins
debug and test interface 14-21 GMS30C7201 data sheet 253 unpcreg npcreg out - 1 * 254 unpcace1 npcace[1] out - 1 * 255 uususpend ususpend out - 0 * 256 uusboe nusboe in - * 1 257 uusboe nusboe out jmuxnportben[2]=0 1 * 258 jmuxnportben[2] - outen0 - 1 * 259 uuvp uvp in - * 0 260 uuvp uvp out jmuxnportben[4]=0 0 * 261 jmuxnportben[4] - outen0 - 1 * 262 uuvmo uvmo in - * 0 263 uuvmo uvmo out jmuxnportben[1]=0 0 * 264 jmuxnportben[1] - outen0 - 1 * 265 uportc7 portc[7] in - * 0 266 uportc7 portc[7] out jnportcen[7]=0 0 * 267 jnportcen[7] - outen0 - 1 * 268 uurcvin urcvin in - * 0 269 uurcvin urcvin out jmuxnportben[3]=0 0 * 270 jmuxnportben[3] - outen0 - 1 * 271 uuvpo uvpo in - * 0 272 uuvpo uvpo out jmuxnportben[0]=0 0 * 273 jmuxnportben[0] - outen0 - 1 * 274 uporta7 porta[7] in - * 0 275 uporta7 porta[7] out jnportaen[7]=0 0 * 276 jnportaen[7] - outen0 - 1 * 277 uuvm uvm in - * 0 278 uuvm uvm out jmuxnportben[5]=0 0 * 279 jmuxnportben[5] - outen0 - 1 * 280 uportb6 portb[6] in - * 0 281 uportb6 portb[6] out jnportben[6]=0 0 * 282 jnportben[6] - outen0 - 1 * 283 uportc6 portc[6] in - * 0 284 uportc6 portc[6] out jnportcen[6]=0 0 * table 14-4: boundary scan signals and pins
debug and test interface 14-22 GMS30C7201 data sheet 285 jnportcen[6] - outen0 - 1 * 286 uporta3 porta[3] in - * 0 287 uporta3 porta[3] out jnportaen[3]=0 0 * 288 jnportaen[3] - outen0 - 1 * 289 uporta6 porta[6] in - * 0 290 uporta6 porta[6] out jnportaen[6]=0 0 * 291 jnportaen[6] - outen0 - 1 * 292 uportc3 portc[3] in - * 0 293 uportc3 portc[3] out jmuxnportcen[3]=0 0 * 294 jmuxnportcen[3] - outen0 - 1 * 295 uportc5 portc[5] in - * 0 296 uportc5 portc[5] out jnportcen[5]=0 0 * 297 jnportcen[5] - outen0 - 1 * 298 uporta2 porta[2] in - * 0 299 uporta2 porta[2] out jnportaen[2]=0 0 * 300 jnportaen[2] - outen0 - 1 * 301 uportc2 portc[2] in - * 0 302 uportc2 portc[2] out jmuxnportcen[2]=0 0 * 303 jmuxnportcen[2] - outen0 - 1 * 304 uporta5 porta[5] in - * 0 305 uporta5 porta[5] out jnportaen[5]=0 0 * 306 jnportaen[5] - outen0 - 1 * 307 uportc4 portc[4] in - * 0 308 uportc4 portc[4] out jmuxnportcen[4]=0 0 * 309 jmuxnportcen[4] - outen0 - 1 * 310 uportb7 portb[7] in - * 0 311 uportb7 portb[7] out jnportben[7]=0 0 * 312 jnportben[7] - outen0 - 1 * 313 uporta1 porta[1] in - * 0 314 uporta1 porta[1] out jnportaen[1]=0 0 * 315 jnportaen[1] - outen0 - 1 * 316 uportc1 portc[1] in - * 0 table 14-4: boundary scan signals and pins
debug and test interface 14-23 GMS30C7201 data sheet 317 uportc1 portc[1] out jmuxnportcen[1]=0 0 * 318 jmuxnportcen[1] - outen0 - 1 * 319 uporta4 porta[4] in - * 0 320 uporta4 porta[4] out jnportaen[4]=0 0 * 321 jnportaen[4] - outen0 - 1 * 322 usd0 sd[0] in - * * 323 usd0 sd[0] out jnsden=0 * * 324 uporta0 porta[0] in - * 0 325 uporta0 porta[0] out jnportaen[0]=0 0 * 326 jnportaen[0] - outen0 - 1 * 327 uportc0 portc[0] in - * 0 328 uportc0 portc[0] out jmuxnportcen[0]=0 0 * 329 jmuxnportcen[0] - outen0 - 1 * 330 usd1 sd[1] in - * * 331 usd1 sd[1] out jnsden=0 * * 332 usd14 sd[14] in - * * 333 usd14 sd[14] out jnsden=0 * * 334 usd2 sd[2] in - * * 335 usd2 sd[2] out jnsden=0 * * 336 usd15 sd[15] in - * * 337 usd15 sd[15] out - * * 338 jnsden - outen0 - 1 * 339 uportd6 portd[6] in - * 0 340 uportd6 portd[6] out jmuxnportden[6]=0 0 * 341 jmuxnportden[6] - outen0 - 1 * 342 usd3 sd[3] in - * * 343 usd3 sd[3] out jnsden=0 * * 344 usd12 sd[12] in - * * 345 usd12 sd[12] out jnsden=0 * * 346 usd4 sd[4] in - * * 347 usd4 sd[4] out jnsden=0 * * 348 usd13 sd[13] in - * * table 14-4: boundary scan signals and pins
debug and test interface 14-24 GMS30C7201 data sheet 349 usd13 sd[13] out jnsden=0 * * 350 usd5 sd[5] in - * * 351 usd5 sd[5] out jnsden=0 * * 352 usd10 sd[10] in - * * 353 usd10 sd[10] out jnsden=0 * * 354 usd11 sd[11] in - * * 355 usd11 sd[11] out jnsden=0 * * 356 usd6 sd[6] in - * * 357 usd6 sd[6] out jnsden=0 * * 358 usd9 sd[9] in - * * 359 usd9 sd[9] out jnsden=0 * * 360 usd7 sd[7] in - * * 361 usd7 sd[7] out jnsden=0 * * 362 upmbatok pmbatok in - * 0 363 usd8 sd[8] in - * * 364 usd8 sd[8] out jnsden=0 * * 365 unswe nswe out - 1 * 366 upmadapok pmadapok in - * 0 367 unscas nscas out - 1 * 368 usdqml sdqml out - 0 * 369 uscke2 scke[2] out - 0 * 370 unpmwakeup npmwakeup in - * 1 371 usdqmu sdqmu out - 0 * 372 uscke0 scke[0] out - 0 * 373 uscke3 scke[3] out - 0 * 374 unscs2 nscs[2] out - 1 * 375 usclk sclk in - * 0 376 usclk sclk out jnsclken=0 0 * 377 jnsclken - outen0 - 1 * 378 uscke1 scke[1] out - 0 * 379 unscs3 nscs[3] out - 1 * 380 unscs0 nscs[0] out - 1 * table 14-4: boundary scan signals and pins
debug and test interface 14-25 GMS30C7201 data sheet 381 usa9 sa[9] out - * * 382 unscs1 nscs[1] out - 1 * 383 usa12 sa[12] out - * * 384 usa11 sa[11] out - * * 385 usa7 sa[7] out - * * 386 usa13 sa[13] out - * * 387 usa0 sa[0] out - * * 388 unsras nsras out - 1 * 389 usa8 sa[8] out - * * 390 usa1 sa[1] out - * * 391 usa10 sa[10] out - * * 392 usa5 sa[5] out - * * 393 uirdout irdout out - 0 * 394 unreset nreset in - * 1 395 unreset nreset out jnreseten=0 1 * 396 jnreseten - outen0 - 1 * 397 usa2 sa[2] out - * * 398 usa6 sa[6] out - * * 399 usa4 sa[4] out - * * 400 unpor npor in - * 1 401 unpllenable npllenable in - * 1 402 usa3 sa[3] out - * * 403 untest ntest in - * 1 table 14-4: boundary scan signals and pins
debug and test interface 14-26 GMS30C7201 data sheet 14.4 production test features in order to generate test vectors suitable for use on a production tester by the chip manufacturer, some special test modes have been introduced. these modes come into operation whenever the pin ntest is forced low. full details of these modes are available from arm in a special test document on request.
15-1 GMS30C7201 data sheet 15.1 absolute maximum ratings 15-2 15.2 dc characteristics 15-3 15.3 a/d converter electrical characteristics 15-5 15.4 d/a converter characteristics 15-6 15.5 ac characteristics 15-7 15.6 recommended soldering conditions 15-13 electrical characteristics 15
electrical characteristics 15-2 GMS30C7201 data sheet 15.1 absolute maximum ratings table 15-1: maximum ratings note: permanent damage can occur if maximum ratings are exceeded. device modules may not operate normally while being exposed to electrical extremes. although sections of the device contain circuitry to protect against damage from high static voltages or electical fields, take normal precautions to avoid exposure to voltages higher than maximum- rated voltage. recommended operating range table 15-2: operating range symbol parameter min typ max units v dd power supply voltage -0.3 5.5 v v i dc input voltage -0.3 vdd+0.5 v v o dc output voltage -0.3 vdd+0.5 v t stg storage temperature -55 150 o c t jct junction temperature -55 150 o c p d power dissipation 277 mw p dwn power dissipation at power down mode 132 uw symbol parameter min max units v dd power supply voltage 3.0 3.6 v t opr operating temperature -40 85 o c
electrical characteristics 15-3 GMS30C7201 data sheet 15.2 dc characteristics all characteristics are specified at vdd = 3.0 to 3.6 volts and vss = 0 volts, over an operating temperature range of -40 to 85 o c cmos pins table 15-3: cmos signal pin characteristics ttl pins table 15-4: ttl signal pin characteristics note : ttl pins are as follows and the drive capability of these is 8ma. vgahs, vgavs, sd[15:0], sa[14:0], sclk, ske[3:0], nsras, nscas, nsw, nscs[3:0], sdqmu, sdqml symbol parameter minimum maximum conditions v il low level input voltage -0.5v 0.8v guaranteed input low voltage v ih high level input voltage 0.7 x v dd 5.5v guaranteed input high volt- age v ol low level output voltage v ss + 0.4v iol = 0.8 ma v oh high level output voltage v dd - 0.4v ioh = 0.8 ma i i input current at maximum voltage 1ma input = 5.5v symbol parameter minimum maximum conditions v il low level input voltage -0.5v 0.8v v ih high level input voltage 2.0 v 5.5v v ol low level output voltage 0.4v iol = 8ma depending on cell v oh high level output voltage 2.4 v ioh = 8ma depending on cell i i input current at maximum voltage 1ma input = 5.5v
electrical characteristics 15-4 GMS30C7201 data sheet i/o circuit pullups the following current values are used for i/os with internal pullup devices. note : the following pins are used with internal pullup devices. nreset, npor, npmwakeup, tck, tms, tdi, ntest, npcacd[1:0], npcbcd[1:0], pcavs[1:0], pcbvs[1:0], nudcd[1:0], nudsr[1:0], nucts[1:0], usin[1:0], kscani[7:0] i/o circuit pulldowns the following current values are used for i/os with internal pulldown devices. note : the following pins are used with internal pulldown devices. ntrst, npllenable symbol parameter minimum(at pad = 0v) maximum(at pad = 0v) i pu 3.3v pullup -30ua -146ua r er equivalent resistance 88.3kohms 24.7kohms symbol parameter minimum(at pad = 2.6v) maximum(at pad = 3.6v) i pd pulldown 31ua 159ua r er equivalent resistance 85.5kohms 22.6kohms
electrical characteristics 15-5 GMS30C7201 data sheet 15.3 a/d converter electrical characteristics advcc = aavcc = 3.3v, fconv = 25ksps unless otherwise specified table 15-5: a/d characteristics item symbol test condition min. typ. max. unit resolution 12 bit signal to noise distortion ratio snr average 4 fsinal=3.125khz 50 65 db analog reference voltage avref aavcc v differential non- linearity dnl 10bit resolution -0.5 0.5 lsb integral non-linearity inl 10bit resolution -1.0 1.0 lsb junction temperature tj -20 130 o c digital power supply advcc 3 3.3 3.6 v analog power supply aavcc 3 3.3 3.6 v current consumption idd operating 6.0 ma idn power save 2.0 ua
electrical characteristics 15-6 GMS30C7201 data sheet 15.4 d/a converter characteristics 15.4.1 audio dac table 15-6: audio dac characteristics 15.4.2 video dac f table 15-7: video dac characteristics item symbol test condition min. typ. max. unit resolution 8 bit conversion speed f con 50 khz d/a output volt- age range v dao vref=3.3v 1.025 2.675 v differential non- linearity dnl ac -1.0 1.0 lsb integral non-linearity inl ac -1.5 1.5 lsb junction temperature tj -20 130 o c digital power sup- ply advcc 3 3.3 3.6 v analog power supply aavcc 3 3.3 3.6 v comsumption current idd fclk=50khz 2 3 5 ma item symbol test condition min. typ. max. unit resolution 12 bit signal to noise distortion ratio snr fcon=330khz 40 50 db differential non- linearity dnl 10bit resolution -1.5 1.5 lsb integral non-linearity inl 10bit resolution -1.5 1.5 lsb full scale current ifull with +/-5% error 26.6 ma rise/fall time tr/tf with +/-10%error 5 ns setup time ts 0.0 3.33 ns hold time th 0.4 0.5 ns output delay time td 3 ns current consumption idd 60 ma
electrical characteristics 15-7 GMS30C7201 data sheet 15.5 ac characteristics all characteristics are specified at vdd = 3.0 to 3.6 volts and vss = 0 volts over an operating temperature of -40 deg c to +85 deg c. 15.5.1 expansion and rom interface figure 15-1: external bus read timing t dhz t oe t xrs t xrh t rdh t rds address n address n + 4 address n + 8 data in data in data in expclk ra nrcs nroe rd exrdy
electrical characteristics 15-8 GMS30C7201 data sheet figure 15-2: external bus writetiming t wdh t wdv t xrh t xrs t wah address n address n + 4 expclk ra nrcs nrwe rd exrdy name description min max unit t dhz falling cs to data bus hi-z 0 15 ns t rdh read data in to falling expclk hold time 0 ns t rds read data in to falling expclk setup time 16 ns t wdh rising nnw to write data valid hold time 20 ns t wah rising owner to valid write address hold time 3 ns t wdv address change to valid write data 18 ns t oe falling cs to output enable low 8 22 ns t xrs exprdy to rising expclk setup time 10 ns t xrh rising expclk to exprdy hold time 22 ns table 15-8: external bus ac timing values
electrical characteristics 15-9 GMS30C7201 data sheet 15.5.2 sdram interface signals figure 15-3: sdram interface timing timing values are derived from simulations using 0pf signal loading. actual circuit output delays should be calculated by adding manufacturers signal load de-rating delay values. sclk nsras, nscas, nswe, nscs[3:0], scke[3:0], sa[13:0], sdqmu, sdqml sd[15:0] (write) t sdz sd[15:0] (read) t sdsu t sdih t sd t sd t sdoh t sden t sdoh symbol parameter min max tsdsu sdram data in setup time to sclkr 0 - tsdih sdram data in hold from sclkr 2 - tsd signal delay from sclkr 2 7 tsdoh sdram data output hold time from sclkr 2 - tsdz sdram data bus disable time from sclkr 2 11 tsden sdram data bus enable time from sclkr 2 9 table 15-9: provisional sdram interface ac parameters (units ns)
electrical characteristics 15-10 GMS30C7201 data sheet 15.5.3 lcd interface, signal stimings figure 15-4: lcd controller timing (stn mode) figure 15-5: lcd controller timing (active-tft mode) lcp llp lfp lac ld[7:0] t1 t2 t3 t5 t6 t7 t4 lfp(vsync) llp(hsync) llp(hsync) lcp(dot clock) lac(oe) ld[11:0] r0 ~ r3 g0 ~ g3 b0 ~ b3 invalid data invalid data t8 t9 t10 t11 t12 t14 t13
electrical characteristics 15-11 GMS30C7201 data sheet notes : tclk is bclk or vclk (lcdc internal clock source, 31.5 or 40mhz) thperiod max = 1408 tclk symbol parameters min. typ. max. unit t1 lcp high time 1 - 16 tclk(notes) t2 lcp low time 1 - 17 tclk t3 llp front-porch 1 - 256 tclk t4 llp pulse width 1 - 256 tclk t5 llp back-porch 1 - 256 tclk t6 falling llp to lfp(lac) toggle 1 - 256 tclk t7 rising lcp to display data change tbd tbd ns t8 vsync width 1 64 thperiod(notes) t9 vsync back-porch 1 256 thperiod t10 vsync front-porch 1 256 thperiod t11 hsync width 1 256 tclk t12 hsync back-porch 1 - 256 tclk t13 hsync front-porch 1 - 256 tclk t14 dot clock period 1 - - tclk table 15-10: lcd interface signal timing parameters
electrical characteristics 15-12 GMS30C7201 data sheet figure 15-6: stn mode signal delay timing values are derived from simulations using 0pf signal loading. actual circuit output delays should be calculated by adding manufacturers signal load de-rating delay values. figure 15-7: tft mode signal delay timing values are derived from simulations using 0pf signal loading. actual circuit output delays should be calculated by adding manufacturers signal load de-rating delay values. symbol parameter min max tmlcdod output delay time from lcp rising - 5 tmlcdoh output hold time from lcp rising - -5 table 15-11: stn mode signal delay parameters symbol parameter min max ttftod output delay time from lcp rising - 3 ttftoh output hold time from lcp rising - -3 table 15-12: tft mode signal delay parameters lcp ld[11:0], lfp, lac t mlcdoh t mlcdod lcp ld[11:0], lfp, lac t tftoh t tftod
electrical characteristics 15-13 GMS30C7201 data sheet 15.6 recommended soldering conditions recommended soldering conditions 1. if the product packed in the moisture-proof bag (dry-pack) that is sensitive to moisture. 2. the following treat- ment is required prior to surface mount assembly to avoid package cracks or reliability degrada- tion related to moisture and thermal stress. 1) the dry packed bag may be stored unopened for up to 12 months beyond the seal date at < 40 c and 90% relative humidity (rh). 2) the contents of the bag may be stored indefinitely at < 20% rh. 3) if upon opening, the humidity indicator card show humidity above 20%, the contents have expired and required re-baking at 125 c for 20 hours. 4) the contents of the bag must be surface mounted within 48 hours of opening the dry bag. it is recommended the dry bag is not opened until just prior to soldering. 5) desiccant and humidity indicator card (hic) contained within dry bag.
electrical characteristics 15-14 GMS30C7201 data sheet
electrical characteristics 15-15 GMS30C7201 data sheet
electrical characteristics 15-16 GMS30C7201 data sheet


▲Up To Search▲   

 
Price & Availability of GMS30C7201

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X